integration test setup
This commit is contained in:
parent
4a77960e76
commit
8c922f5d08
|
@ -24,7 +24,7 @@ const controller = {
|
|||
}
|
||||
},
|
||||
destroy: async ctx => {
|
||||
const database = couchdb.db.use(ctx.params.databaseId);
|
||||
const database = couchdb.db.use(ctx.params.instanceId);
|
||||
ctx.body = await database.destroy(ctx.params.userId)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
exports[`/views fetch returns a list of all the views that exist in the instance database 1`] = `
|
||||
Object {
|
||||
"all_89baeed104b7f2e3fd977e9bc2039d5c": Object {
|
||||
"map": "function (doc) {
|
||||
emit([doc.modelId], doc._id);
|
||||
}",
|
||||
},
|
||||
"by_type": Object {
|
||||
"map": "function (doc) {
|
||||
emit([doc.type], doc._id);
|
||||
|
|
|
@ -5,7 +5,8 @@ const router = Router();
|
|||
|
||||
router
|
||||
.get("/api/:instanceId/views", controller.fetch)
|
||||
.post("/api/:instanceId/views", controller.create);
|
||||
// .patch("/api/:databaseId/views", controller.update);
|
||||
// .delete("/api/:instanceId/views/:viewId/:revId", controller.destroy);
|
||||
.post("/api/:instanceId/views", controller.create);
|
||||
|
||||
module.exports = router;
|
|
@ -5,6 +5,7 @@
|
|||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "jest apps && jest builder",
|
||||
"test:integration": "jest neo --runInBand",
|
||||
"test:watch": "jest -w",
|
||||
"build": "cd appPackages/_master && yarn && cd ../testApp && yarn && cd ../testApp2 && yarn",
|
||||
"initialise": "node ./initialise/initialiseBudibase init -d ./myapps -c contributors -u admin -p admin",
|
||||
|
|
Loading…
Reference in New Issue