forked from ScottLogic/openapi-forge-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
13 lines (9 loc) · 610 Bytes
/
test.js
File metadata and controls
13 lines (9 loc) · 610 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
const shell = require("shelljs");
// Extract cl arguments
const clArgs = process.argv.slice(2);
// Retrieve the path to feature paths from cl arguments of 'npm test', use default value if none given
featurePath = clArgs[0] || "../openapi-forge/features/*.feature";
// Retrieve the path to generate.js from cl arguments of 'npm test', use default value if none given
generatePath = clArgs[1] || "openapi-forge/src/generate";
// Pass both paths to cucumber-js which spawns another node process to handle the testing.
shell.exec(`.\\node_modules\\.bin\\cucumber-js -p default ${featurePath} ${generatePath}`);