mirror of
https://github.com/typicode/json-server.git
synced 2025-08-01 09:13:32 +08:00
First commit
This commit is contained in:
18
test/fixture.js
Normal file
18
test/fixture.js
Normal file
@ -0,0 +1,18 @@
|
||||
// Small database to be used during tests
|
||||
module.exports = function() {
|
||||
var db = {};
|
||||
|
||||
db.posts = [
|
||||
{id: 1, body: 'foo'},
|
||||
{id: 2, body: 'bar'}
|
||||
]
|
||||
|
||||
db.comments = [
|
||||
{id: 1, published: true, postId: 1},
|
||||
{id: 2, published: false, postId: 1},
|
||||
{id: 3, published: false, postId: 2},
|
||||
{id: 4, published: false, postId: 2},
|
||||
]
|
||||
|
||||
return db;
|
||||
}
|
Reference in New Issue
Block a user