Skip to content

Commit

Permalink
Improve plugin loading in tests (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnkiefer authored Oct 13, 2023
1 parent 15681c6 commit ea9ebf5
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 21 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@sap/cds": "^7"
},
"devDependencies": {
"@cap-js/change-tracking": "file:.",
"@cap-js/sqlite": "^1",
"axios": "^1",
"chai": "^4.3.10",
Expand Down
3 changes: 0 additions & 3 deletions tests/bookshop/package-lock.json

This file was deleted.

3 changes: 3 additions & 0 deletions tests/bookshop/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"dependencies": {
"@cap-js/change-tracking": "*"
},
"devDependencies": {
"@cap-js/sqlite": "*"
},
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/fiori-draft-disabled.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ const cds = require("@sap/cds");
const bookshop = require("path").resolve(__dirname, "./../bookshop");
const { expect, data, POST, PATCH, DELETE } = cds.test(bookshop);

// REVISIT: should be easier to load the plugin and its model
cds.env.plugins["@cap-js/change-tracking"] = {
"impl": require("path").join(__dirname, "../../cds-plugin.js")
}
cds.env.roots.push("../../");

jest.setTimeout(5 * 60 * 1000);

let adminService = null;
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/fiori-draft-enabled.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ const bookshop = require("path").resolve(__dirname, "./../bookshop");
const { expect, data, POST, PATCH, DELETE } = cds.test(bookshop);
const { RequestSend } = require("../utils/api");

// REVISIT: should be easier to load the plugin and its model
cds.env.plugins["@cap-js/change-tracking"] = {
"impl": require("path").join(__dirname, "../../cds-plugin.js")
}
cds.env.roots.push("../../");

jest.setTimeout(5 * 60 * 1000);

let adminService = null;
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/service-api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ const cds = require("@sap/cds");
const bookshop = require("path").resolve(__dirname, "./../bookshop");
const { expect, data } = cds.test(bookshop);

// REVISIT: should be easier to load the plugin and its model
cds.env.plugins["@cap-js/change-tracking"] = {
"impl": require("path").join(__dirname, "../../cds-plugin.js")
}
cds.env.roots.push("../../");

jest.setTimeout(5 * 60 * 1000);

let adminService = null;
Expand Down

0 comments on commit ea9ebf5

Please sign in to comment.