We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9aa50a0 commit 528cdf2Copy full SHA for 528cdf2
17-nodejs/02-egg/test/app/controller/post.test.ts
@@ -1,13 +1,13 @@
1
import { app } from 'egg-mock/bootstrap';
2
import assert = require('assert');
3
-// import { expect } from 'chai';
+import { expect } from 'chai';
4
5
describe('test/app/service/post.test.js', () => {
6
describe('GET /api/posts', () => {
7
it('should work', async () => {
8
await app.factory.createMany('post', 3);
9
const res = await app.httpRequest().get('/api/posts?limit=2');
10
- assert(res.status === 200);
+ expect(res.status).to.be.equal(200);
11
assert(res.body.data.count === 3);
12
assert(res.body.data.rows.length === 2);
13
assert(res.body.data.rows[0].title);
0 commit comments