@servicetitan/startup-jest 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jest/index.d.ts.map +1 -1
- package/dist/jest/index.js +12 -3
- package/dist/jest/index.js.map +1 -1
- package/package.json +2 -2
- package/src/jest/index.ts +13 -3
package/dist/jest/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jest/index.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jest/index.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,SAezB"}
|
package/dist/jest/index.js
CHANGED
|
@@ -10,11 +10,20 @@ Object.defineProperty(exports, "runJestCli", {
|
|
|
10
10
|
});
|
|
11
11
|
const _child_process = require("child_process");
|
|
12
12
|
function runJestCli() {
|
|
13
|
-
|
|
13
|
+
let args = process.argv.slice(2); // argv[0] = Node executable, argv[1] = script path
|
|
14
|
+
/*
|
|
15
|
+
* Convert --runTestByPath added by webstorm to explicit --runTestsByPath=true so
|
|
16
|
+
* the CLI doesn't misinterpret the boolean option.
|
|
17
|
+
*/ args = args.map((option)=>option === '--runTestsByPath' ? '--runTestsByPath=true' : option);
|
|
14
18
|
const command = `npx startup test ${args.join(' ')}`;
|
|
15
19
|
console.log(`> ${command}`); // eslint-disable-line no-console
|
|
16
|
-
(0, _child_process.
|
|
17
|
-
|
|
20
|
+
(0, _child_process.execFileSync)('npx', [
|
|
21
|
+
'startup',
|
|
22
|
+
'test',
|
|
23
|
+
...args
|
|
24
|
+
], {
|
|
25
|
+
stdio: 'inherit',
|
|
26
|
+
shell: process.platform === 'win32'
|
|
18
27
|
});
|
|
19
28
|
}
|
|
20
29
|
|
package/dist/jest/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/jest/index.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/jest/index.ts"],"sourcesContent":["import { execFileSync } from 'child_process';\n\nexport function runJestCli() {\n let args = process.argv.slice(2); // argv[0] = Node executable, argv[1] = script path\n\n /*\n * Convert --runTestByPath added by webstorm to explicit --runTestsByPath=true so\n * the CLI doesn't misinterpret the boolean option.\n */\n args = args.map(option => (option === '--runTestsByPath' ? '--runTestsByPath=true' : option));\n\n const command = `npx startup test ${args.join(' ')}`;\n console.log(`> ${command}`); // eslint-disable-line no-console\n execFileSync('npx', ['startup', 'test', ...args], {\n stdio: 'inherit',\n shell: process.platform === 'win32', // on Windows NPM.CMD requires a shell\n });\n}\n"],"names":["runJestCli","args","process","argv","slice","map","option","command","join","console","log","execFileSync","stdio","shell","platform"],"mappings":";;;;+BAEgBA;;;eAAAA;;;+BAFa;AAEtB,SAASA;IACZ,IAAIC,OAAOC,QAAQC,IAAI,CAACC,KAAK,CAAC,IAAI,mDAAmD;IAErF;;;KAGC,GACDH,OAAOA,KAAKI,GAAG,CAACC,CAAAA,SAAWA,WAAW,qBAAqB,0BAA0BA;IAErF,MAAMC,UAAU,CAAC,iBAAiB,EAAEN,KAAKO,IAAI,CAAC,MAAM;IACpDC,QAAQC,GAAG,CAAC,CAAC,EAAE,EAAEH,SAAS,GAAG,iCAAiC;IAC9DI,IAAAA,2BAAY,EAAC,OAAO;QAAC;QAAW;WAAWV;KAAK,EAAE;QAC9CW,OAAO;QACPC,OAAOX,QAAQY,QAAQ,KAAK;IAChC;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/startup-jest",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/startup",
|
|
6
6
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"cli": {
|
|
27
27
|
"webpack": false
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "e5cc4337a19b32de0595e1f23d13029c40b350c2"
|
|
30
30
|
}
|
package/src/jest/index.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { execFileSync } from 'child_process';
|
|
2
2
|
|
|
3
3
|
export function runJestCli() {
|
|
4
|
-
|
|
4
|
+
let args = process.argv.slice(2); // argv[0] = Node executable, argv[1] = script path
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Convert --runTestByPath added by webstorm to explicit --runTestsByPath=true so
|
|
8
|
+
* the CLI doesn't misinterpret the boolean option.
|
|
9
|
+
*/
|
|
10
|
+
args = args.map(option => (option === '--runTestsByPath' ? '--runTestsByPath=true' : option));
|
|
11
|
+
|
|
5
12
|
const command = `npx startup test ${args.join(' ')}`;
|
|
6
13
|
console.log(`> ${command}`); // eslint-disable-line no-console
|
|
7
|
-
|
|
14
|
+
execFileSync('npx', ['startup', 'test', ...args], {
|
|
15
|
+
stdio: 'inherit',
|
|
16
|
+
shell: process.platform === 'win32', // on Windows NPM.CMD requires a shell
|
|
17
|
+
});
|
|
8
18
|
}
|