Skip to content

Commit 528cdf2

Browse files
chai
1 parent 9aa50a0 commit 528cdf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

17-nodejs/02-egg/test/app/controller/post.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { app } from 'egg-mock/bootstrap';
22
import assert = require('assert');
3-
// import { expect } from 'chai';
3+
import { expect } from 'chai';
44

55
describe('test/app/service/post.test.js', () => {
66
describe('GET /api/posts', () => {
77
it('should work', async () => {
88
await app.factory.createMany('post', 3);
99
const res = await app.httpRequest().get('/api/posts?limit=2');
10-
assert(res.status === 200);
10+
expect(res.status).to.be.equal(200);
1111
assert(res.body.data.count === 3);
1212
assert(res.body.data.rows.length === 2);
1313
assert(res.body.data.rows[0].title);

0 commit comments

Comments
 (0)