mirror of
https://github.com/typicode/json-server.git
synced 2025-08-03 04:12:22 +08:00
fix: tests
This commit is contained in:
@ -73,8 +73,8 @@ describe('cli', function () {
|
||||
request.post('/posts')
|
||||
.send({ title: 'hello' })
|
||||
.end(function () {
|
||||
var str = fs.readFileSync(dbFile, 'utf8')
|
||||
setTimeout(function () {
|
||||
var str = fs.readFileSync(dbFile, 'utf8')
|
||||
assert(str.indexOf('hello') !== -1)
|
||||
done()
|
||||
}, 1000)
|
||||
|
@ -614,7 +614,7 @@ describe('Server', function () {
|
||||
describe('router.db._.id', function (done) {
|
||||
|
||||
beforeEach(function () {
|
||||
router.db.getState({
|
||||
router.db.setState({
|
||||
posts: [
|
||||
{ _id: 1 }
|
||||
]
|
||||
|
Reference in New Issue
Block a user