forked from ujjwalguptaofficial/fortjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_runner.js
More file actions
36 lines (24 loc) · 787 Bytes
/
Copy pathtest_runner.js
File metadata and controls
36 lines (24 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const { execSync } = require('child_process');
const testCommand = `npm run install:build:test`;
const testCommandForProd = `cross-env NODE_ENV=production ` + testCommand;
const testCommandForDev = `cross-env NODE_ENV=development ` + testCommand;
// run in development
execSync(`cd tests/general && ${testCommandForDev}`, {
stdio: 'inherit'
});
execSync(`cd tests/javascript && ${testCommandForDev}`, {
stdio: 'inherit'
});
execSync(`cd tests/filetest && ${testCommandForDev}`, {
stdio: 'inherit'
});
// run in prod
execSync(`cd tests/general && ${testCommandForProd}`, {
stdio: 'inherit'
});
execSync(`cd tests/javascript && ${testCommandForProd}`, {
stdio: 'inherit'
});
execSync(`cd tests/filetest && ${testCommandForProd}`, {
stdio: 'inherit'
});