Skip to content

Commit

Permalink
update tc
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Aug 1, 2019
1 parent 9c08757 commit db3fb39
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions __tests__/specs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ describe('xtpl', function () {
}, function (err, data) {
expect(err).toBe(null);
expect(data).toBe('<&gt;');
console.log('oooo')
done();
});
});

it('works on node when cached', function (done) {
function check(){
if (++count === 2) {
console.log('check');
done();
}
}
Expand Down Expand Up @@ -78,15 +76,10 @@ describe('xtpl', function () {
expect(html).toBe('<&gt;foo20');
});

const server = app.listen();
request(server)
request(app.callback())
.get('/')
.expect(200)
.expect('<&gt;foo20', ()=>{
console.log('oooo')
server.close();
done();
});
.expect('<&gt;foo20', done);
});

it('works for koa and absolute path', function (done) {
Expand All @@ -102,15 +95,10 @@ describe('xtpl', function () {
});
expect(html).toBe('<&gt;foo20');
});
const server = app.listen();
request(server)
request(app.callback())
.get('/')
.expect(200)
.expect('<&gt;foo20', ()=>{
console.log('oooo')
server.close();
done();
});
.expect('<&gt;foo20', done);

});
});

0 comments on commit db3fb39

Please sign in to comment.