mirror of
https://github.com/typicode/json-server.git
synced 2025-08-02 19:52:20 +08:00
Fix lint errors
This commit is contained in:
@ -523,7 +523,7 @@ describe('Server', () => {
|
||||
.expect('Content-Type', /json/)
|
||||
.expect({ id: 3, body: 'foo', booleanValue: true, integerValue: 1 })
|
||||
.expect(201)
|
||||
assert.equal(db.posts.length, 3)
|
||||
assert.strictEqual(db.posts.length, 3)
|
||||
})
|
||||
|
||||
test('should support x-www-form-urlencoded', async () => {
|
||||
@ -535,7 +535,7 @@ describe('Server', () => {
|
||||
// x-www-form-urlencoded will convert to string
|
||||
.expect({ id: 3, body: 'foo', booleanValue: 'true', integerValue: '1' })
|
||||
.expect(201)
|
||||
assert.equal(db.posts.length, 3)
|
||||
assert.strictEqual(db.posts.length, 3)
|
||||
})
|
||||
|
||||
test('should respond with json, create a resource and generate string id', async () => {
|
||||
@ -544,7 +544,7 @@ describe('Server', () => {
|
||||
.send({ url: 'http://foo.com', postId: 1 })
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(201)
|
||||
assert.equal(db.refs.length, 2)
|
||||
assert.strictEqual(db.refs.length, 2)
|
||||
})
|
||||
})
|
||||
|
||||
@ -656,8 +656,8 @@ describe('Server', () => {
|
||||
.del('/posts/1')
|
||||
.expect({})
|
||||
.expect(200)
|
||||
assert.equal(db.posts.length, 1)
|
||||
assert.equal(db.comments.length, 3)
|
||||
assert.strictEqual(db.posts.length, 1)
|
||||
assert.strictEqual(db.comments.length, 3)
|
||||
})
|
||||
|
||||
test('should respond with 404 if resource is not found', () =>
|
||||
|
Reference in New Issue
Block a user