sxy-test-runner 1.4.4 → 2.0.0
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/cli/index.js +24 -22
- package/dist/cli/init.js +41 -91
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/lib/addBasePath.d.ts.map +1 -1
- package/dist/cli/lib/addBasePath.js +12 -14
- package/dist/cli/lib/addBasePath.js.map +1 -1
- package/dist/cli/lib/addBasePath.unitTest.d.ts +2 -0
- package/dist/cli/lib/addBasePath.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/addBasePath.unitTest.js +51 -29
- package/dist/cli/lib/addBasePath.unitTest.js.map +1 -0
- package/dist/cli/lib/addExports.js +13 -11
- package/dist/cli/lib/addExports.unitTest.d.ts +2 -0
- package/dist/cli/lib/addExports.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/addExports.unitTest.js +15 -30
- package/dist/cli/lib/addExports.unitTest.js.map +1 -0
- package/dist/cli/lib/applyConfigDefaults.js +6 -42
- package/dist/cli/lib/applyConfigDefaults.js.map +1 -1
- package/dist/cli/lib/applyConfigDefaults.unitTest.d.ts +2 -0
- package/dist/cli/lib/applyConfigDefaults.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/applyConfigDefaults.unitTest.js +19 -27
- package/dist/cli/lib/applyConfigDefaults.unitTest.js.map +1 -0
- package/dist/cli/lib/buildDependencyTree.js +23 -34
- package/dist/cli/lib/buildDependencyTree.js.map +1 -1
- package/dist/cli/lib/buildDependencyTree.unitTest.d.ts +2 -0
- package/dist/cli/lib/buildDependencyTree.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/buildDependencyTree.unitTest.js +13 -11
- package/dist/cli/lib/buildDependencyTree.unitTest.js.map +1 -0
- package/dist/cli/lib/buildDependencyTrees.js +15 -34
- package/dist/cli/lib/buildDependencyTrees.js.map +1 -1
- package/dist/cli/lib/buildDependencyTrees.unitTest.d.ts +2 -0
- package/dist/cli/lib/buildDependencyTrees.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/buildDependencyTrees.unitTest.js +18 -14
- package/dist/cli/lib/buildDependencyTrees.unitTest.js.map +1 -0
- package/dist/cli/lib/defaultConfig.js +23 -21
- package/dist/cli/lib/defaultConfig.unitTest.d.ts +2 -0
- package/dist/cli/lib/defaultConfig.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/defaultConfig.unitTest.js +7 -0
- package/dist/cli/lib/defaultConfig.unitTest.js.map +1 -0
- package/dist/cli/lib/doUserSetup.d.ts +1 -1
- package/dist/cli/lib/doUserSetup.d.ts.map +1 -1
- package/dist/cli/lib/doUserSetup.js +20 -23
- package/dist/cli/lib/doUserSetup.js.map +1 -1
- package/dist/cli/lib/doUserSetup.unitTest.d.ts +7 -0
- package/dist/cli/lib/doUserSetup.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/doUserSetup.unitTest.js +41 -36
- package/dist/cli/lib/doUserSetup.unitTest.js.map +1 -0
- package/dist/cli/lib/doUserTeardown.d.ts +1 -1
- package/dist/cli/lib/doUserTeardown.d.ts.map +1 -1
- package/dist/cli/lib/doUserTeardown.js +21 -23
- package/dist/cli/lib/doUserTeardown.js.map +1 -1
- package/dist/cli/lib/doUserTeardown.unitTest.d.ts +7 -0
- package/dist/cli/lib/doUserTeardown.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/doUserTeardown.unitTest.js +41 -36
- package/dist/cli/lib/doUserTeardown.unitTest.js.map +1 -0
- package/dist/cli/lib/findTestFiles.d.ts.map +1 -1
- package/dist/cli/lib/findTestFiles.js +16 -24
- package/dist/cli/lib/findTestFiles.js.map +1 -1
- package/dist/cli/lib/findTestFiles.unitTest.d.ts +2 -0
- package/dist/cli/lib/findTestFiles.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/findTestFiles.unitTest.js +19 -19
- package/dist/cli/lib/findTestFiles.unitTest.js.map +1 -0
- package/dist/cli/lib/getAllowedFlags.js +10 -8
- package/dist/cli/lib/getAllowedFlags.unitTest.d.ts +2 -0
- package/dist/cli/lib/getAllowedFlags.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/getAllowedFlags.unitTest.js +22 -21
- package/dist/cli/lib/getAllowedFlags.unitTest.js.map +1 -0
- package/dist/cli/lib/globArgCombine.js +8 -1
- package/dist/cli/lib/globArgCombine.unitTest.d.ts +2 -0
- package/dist/cli/lib/globArgCombine.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/globArgCombine.unitTest.js +19 -18
- package/dist/cli/lib/globArgCombine.unitTest.js.map +1 -0
- package/dist/cli/lib/injectProperties.d.ts.map +1 -1
- package/dist/cli/lib/injectProperties.js +10 -10
- package/dist/cli/lib/injectProperties.js.map +1 -1
- package/dist/cli/lib/injectProperties.unitTest.d.ts +2 -0
- package/dist/cli/lib/injectProperties.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/injectProperties.unitTest.js +19 -81
- package/dist/cli/lib/injectProperties.unitTest.js.map +1 -0
- package/dist/cli/lib/loadConfig.js +14 -18
- package/dist/cli/lib/loadConfig.js.map +1 -1
- package/dist/cli/lib/loadConfig.unitTest.d.ts +2 -0
- package/dist/cli/lib/loadConfig.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/loadConfig.unitTest.js +15 -15
- package/dist/cli/lib/loadConfig.unitTest.js.map +1 -0
- package/dist/cli/lib/loadTestFile.js +48 -78
- package/dist/cli/lib/loadTestFile.js.map +1 -1
- package/dist/cli/lib/loadTestFile.unitTest.d.ts +2 -0
- package/dist/cli/lib/loadTestFile.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/loadTestFile.unitTest.js +12 -49
- package/dist/cli/lib/loadTestFile.unitTest.js.map +1 -0
- package/dist/cli/lib/parseCommandLineArguments.js +48 -42
- package/dist/cli/lib/parseCommandLineArguments.unitTest.d.ts +2 -0
- package/dist/cli/lib/parseCommandLineArguments.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/parseCommandLineArguments.unitTest.js +22 -24
- package/dist/cli/lib/parseCommandLineArguments.unitTest.js.map +1 -0
- package/dist/cli/lib/parseDescribe.d.ts.map +1 -1
- package/dist/cli/lib/parseDescribe.js +67 -81
- package/dist/cli/lib/parseDescribe.js.map +1 -1
- package/dist/cli/lib/parseDescribe.unitTest.d.ts +2 -0
- package/dist/cli/lib/parseDescribe.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/parseDescribe.unitTest.js +20 -18
- package/dist/cli/lib/parseDescribe.unitTest.js.map +1 -0
- package/dist/cli/lib/reservedExportKeys.d.ts +2 -0
- package/dist/cli/lib/reservedExportKeys.d.ts.map +1 -0
- package/dist/cli/lib/reservedExportKeys.js +12 -1
- package/dist/cli/lib/reservedExportKeys.js.map +1 -0
- package/dist/cli/lib/reservedExportKeys.unitTest.d.ts +2 -0
- package/dist/cli/lib/reservedExportKeys.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/reservedExportKeys.unitTest.js +6 -8
- package/dist/cli/lib/reservedExportKeys.unitTest.js.map +1 -0
- package/dist/cli/lib/runDescribe.d.ts.map +1 -1
- package/dist/cli/lib/runDescribe.js +39 -39
- package/dist/cli/lib/runDescribe.js.map +1 -1
- package/dist/cli/lib/runDescribe.unitTest.d.ts +2 -0
- package/dist/cli/lib/runDescribe.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/runDescribe.unitTest.js +22 -402
- package/dist/cli/lib/runDescribe.unitTest.js.map +1 -0
- package/dist/cli/lib/runDescribeRun.js +34 -49
- package/dist/cli/lib/runDescribeRun.js.map +1 -1
- package/dist/cli/lib/runDescribeRun.unitTest.d.ts +2 -0
- package/dist/cli/lib/runDescribeRun.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/runDescribeRun.unitTest.js +44 -410
- package/dist/cli/lib/runDescribeRun.unitTest.js.map +1 -0
- package/dist/cli/lib/runIt.d.ts +1 -1
- package/dist/cli/lib/runIt.d.ts.map +1 -1
- package/dist/cli/lib/runIt.js +59 -69
- package/dist/cli/lib/runIt.js.map +1 -1
- package/dist/cli/lib/runIt.unitTest.d.ts +2 -0
- package/dist/cli/lib/runIt.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/runIt.unitTest.js +73 -410
- package/dist/cli/lib/runIt.unitTest.js.map +1 -0
- package/dist/cli/lib/runTasks.d.ts +1 -1
- package/dist/cli/lib/runTasks.d.ts.map +1 -1
- package/dist/cli/lib/runTasks.js +28 -31
- package/dist/cli/lib/runTasks.js.map +1 -1
- package/dist/cli/lib/runTasks.unitTest.d.ts +5 -0
- package/dist/cli/lib/runTasks.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/runTasks.unitTest.js +35 -31
- package/dist/cli/lib/runTasks.unitTest.js.map +1 -0
- package/dist/cli/lib/runTest.js +54 -66
- package/dist/cli/lib/runTest.js.map +1 -1
- package/dist/cli/lib/runTest.unitTest.d.ts +20 -0
- package/dist/cli/lib/runTest.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/runTest.unitTest.js +274 -289
- package/dist/cli/lib/runTest.unitTest.js.map +1 -0
- package/dist/cli/lib/runTests.d.ts.map +1 -1
- package/dist/cli/lib/runTests.js +123 -141
- package/dist/cli/lib/runTests.js.map +1 -1
- package/dist/cli/lib/runTests.unitTest.d.ts +6 -0
- package/dist/cli/lib/runTests.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/runTests.unitTest.js +48 -61
- package/dist/cli/lib/runTests.unitTest.js.map +1 -0
- package/dist/cli/lib/showTestLoadingError.js +22 -33
- package/dist/cli/lib/showTestLoadingError.js.map +1 -1
- package/dist/cli/lib/showTestLoadingError.unitTest.d.ts +2 -0
- package/dist/cli/lib/showTestLoadingError.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/showTestLoadingError.unitTest.js +16 -24
- package/dist/cli/lib/showTestLoadingError.unitTest.js.map +1 -0
- package/dist/cli/lib/showTestResult.js +88 -88
- package/dist/cli/lib/showTestResult.js.map +1 -1
- package/dist/cli/lib/showTestResult.unitTest.d.ts +2 -0
- package/dist/cli/lib/showTestResult.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/showTestResult.unitTest.js +176 -184
- package/dist/cli/lib/showTestResult.unitTest.js.map +1 -0
- package/dist/cli/lib/testHelpers/makeCustomOut.d.ts +7 -0
- package/dist/cli/lib/testHelpers/makeCustomOut.d.ts.map +1 -0
- package/dist/cli/lib/testHelpers/makeCustomOut.js +10 -0
- package/dist/cli/lib/testHelpers/makeCustomOut.js.map +1 -0
- package/dist/cli/lib/timeProfier.js +4 -6
- package/dist/cli/lib/timeProfier.js.map +1 -1
- package/dist/cli/lib/validateConfig.js +21 -24
- package/dist/cli/lib/validateConfig.unitTest.d.ts +2 -0
- package/dist/cli/lib/validateConfig.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/validateConfig.unitTest.js +17 -18
- package/dist/cli/lib/validateConfig.unitTest.js.map +1 -0
- package/dist/cli/lib/{watchFiles.js → watchFiles.d.ts} +2 -1
- package/dist/cli/lib/watchFiles.d.ts.map +1 -0
- package/dist/cli/lib/watchFiles.js.map +1 -0
- package/dist/cli/lib/watchFiles.unitTest.d.ts +2 -0
- package/dist/cli/lib/watchFiles.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/watchFiles.unitTest.js.map +1 -0
- package/dist/cli/lib/watchFilesAndRunTests.js +2 -3
- package/dist/cli/lib/watchFilesAndRunTests.unitTest.d.ts +2 -0
- package/dist/cli/lib/watchFilesAndRunTests.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesAndRunTests.unitTest.js +86 -96
- package/dist/cli/lib/watchFilesAndRunTests.unitTest.js.map +1 -0
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.d.ts.map +1 -1
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.js +99 -127
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.js.map +1 -1
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.d.ts +2 -0
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.js +90 -99
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.js.map +1 -0
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.d.ts.map +1 -1
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js +108 -148
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js.map +1 -1
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.d.ts +2 -0
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.js +87 -100
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.js.map +1 -0
- package/dist/cli/lib/watchFilesChokidar.js +30 -56
- package/dist/cli/lib/watchFilesChokidar.js.map +1 -1
- package/dist/cli/lib/watchFilesChokidar.unitTest.d.ts +2 -0
- package/dist/cli/lib/watchFilesChokidar.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesChokidar.unitTest.js +77 -81
- package/dist/cli/lib/watchFilesChokidar.unitTest.js.map +1 -0
- package/dist/cli/lib/watchFilesNodeWatch.js +31 -41
- package/dist/cli/lib/watchFilesNodeWatch.js.map +1 -1
- package/dist/cli/lib/watchFilesNodeWatch.unitTest.d.ts +2 -0
- package/dist/cli/lib/watchFilesNodeWatch.unitTest.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesNodeWatch.unitTest.js +41 -46
- package/dist/cli/lib/watchFilesNodeWatch.unitTest.js.map +1 -0
- package/dist/cli/once.js +35 -42
- package/dist/cli/once.js.map +1 -1
- package/dist/cli/watch.js +64 -114
- package/dist/cli/watch.js.map +1 -1
- package/dist/cli/watch.unitTest.d.ts +6 -0
- package/dist/cli/watch.unitTest.d.ts.map +1 -0
- package/dist/cli/watch.unitTest.js +100 -111
- package/dist/cli/watch.unitTest.js.map +1 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -2
- package/dist/config.js.map +1 -1
- package/dist/describe.js +20 -34
- package/dist/describe.js.map +1 -1
- package/dist/describe.unitTest.d.ts +2 -0
- package/dist/describe.unitTest.d.ts.map +1 -0
- package/dist/describe.unitTest.js +19 -23
- package/dist/describe.unitTest.js.map +1 -0
- package/dist/index.js +2 -1
- package/dist/indexNumberToLetters.js +12 -11
- package/dist/output.js +16 -18
- package/dist/packages/chalk.d.ts +14 -0
- package/dist/packages/chalk.d.ts.map +1 -0
- package/dist/packages/chalk.js +22 -0
- package/dist/packages/chalk.js.map +1 -0
- package/dist/packages/figures.d.ts +6 -0
- package/dist/packages/figures.d.ts.map +1 -0
- package/dist/packages/figures.js +24 -0
- package/dist/packages/figures.js.map +1 -0
- package/dist/packages/loadConfig.d.ts +3 -0
- package/dist/packages/loadConfig.d.ts.map +1 -0
- package/dist/packages/loadConfig.js +28 -0
- package/dist/packages/loadConfig.js.map +1 -0
- package/dist/packages/mergeStructuredConfig.d.ts +2 -0
- package/dist/packages/mergeStructuredConfig.d.ts.map +1 -0
- package/dist/packages/mergeStructuredConfig.js +26 -0
- package/dist/packages/mergeStructuredConfig.js.map +1 -0
- package/dist/packages/slash.d.ts +2 -0
- package/dist/packages/slash.d.ts.map +1 -0
- package/dist/packages/slash.js +9 -0
- package/dist/packages/slash.js.map +1 -0
- package/dist/packages/timeProfiler.d.ts +6 -0
- package/dist/packages/timeProfiler.d.ts.map +1 -0
- package/dist/packages/timeProfiler.js +32 -0
- package/dist/packages/timeProfiler.js.map +1 -0
- package/dist/types.d.ts +13 -13
- package/dist/types.d.ts.map +1 -1
- package/package.json +24 -20
- package/dist/cli/files.js +0 -20
- package/dist/cli/files.unitTest.js +0 -246
- package/dist/cli/init.unitTest.js +0 -0
- package/dist/cli/lib/defaultConfig.test.js +0 -9
- package/dist/cli/lib/loadTestFileStatic.js +0 -41
- package/dist/cli/lib/loadTestFileStatic.unitTest.js +0 -30
- package/dist/cli/lib/processWatchEvent.js +0 -1
- package/dist/cli/lib/processWatchEvent.unitTest.js +0 -15
- package/dist/cli/lib/runDescribe.old.js +0 -108
- package/dist/cli/lib/runDescribe.old.unitTest.js +0 -440
- package/dist/cli/lib/runTest-old.js +0 -160
- package/dist/cli/lib/runTest-old.unitTest.js +0 -184
- package/dist/cli/lib/watchFiles.unitTest.js +0 -50
- package/dist/cli/once.unitTest.js +0 -39
- package/dist/describe-old.js +0 -271
- package/dist/describe-old.unitTest.js +0 -30
- package/dist/exported.eslintrc.js +0 -7
- package/dist/lib/arrayRemove.d.ts +0 -2
- package/dist/lib/arrayRemove.d.ts.map +0 -1
- package/dist/lib/arrayRemove.js +0 -15
- package/dist/lib/arrayRemove.js.map +0 -1
- package/dist/lib/promiseAllObj.d.ts +0 -2
- package/dist/lib/promiseAllObj.d.ts.map +0 -1
- package/dist/lib/promiseAllObj.js +0 -14
- package/dist/lib/promiseAllObj.js.map +0 -1
- package/dist/testsState.js +0 -5
- package/dist/timeProfiling.js +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sxy-test-runner",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/RobertSandiford/sxy-test-runner",
|
|
6
6
|
"repository": {
|
|
@@ -17,8 +17,12 @@
|
|
|
17
17
|
"Automated Tests"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=24"
|
|
22
|
+
},
|
|
20
23
|
"main": "dist/index.js",
|
|
21
24
|
"module": "dist/index.js",
|
|
25
|
+
"types": "dist/index.d.ts",
|
|
22
26
|
"bin": {
|
|
23
27
|
"sxy-test": "./dist/cli/index.js",
|
|
24
28
|
"sxy-test-runner": "./dist/cli/index.js"
|
|
@@ -29,41 +33,42 @@
|
|
|
29
33
|
"readme.md"
|
|
30
34
|
],
|
|
31
35
|
"dependencies": {
|
|
32
|
-
"
|
|
33
|
-
"chalk-extensions": "^1.0.1",
|
|
36
|
+
"chalk": "^4.1.2",
|
|
34
37
|
"chokidar": "^3.6.0",
|
|
35
38
|
"cross-env": "^7.0.3",
|
|
36
39
|
"dependency-tree": "^8.1.2",
|
|
37
40
|
"esm-reload": "^1.0.1",
|
|
38
|
-
"figures": "^4.0.1",
|
|
39
|
-
"glob": "^7.2.3",
|
|
40
|
-
"globby": "^12.2.0",
|
|
41
41
|
"minimatch": "^5.1.6",
|
|
42
42
|
"node-watch": "^0.7.4",
|
|
43
|
-
"
|
|
44
|
-
"sxy-dev-tools": "^1.0.6",
|
|
45
|
-
"sxy-helpers": "^1.0.0",
|
|
46
|
-
"sxy-lib": "^3.0.4",
|
|
47
|
-
"sxy-lib-object-copy": "^2.0.5"
|
|
43
|
+
"sxy-lib": "^3.0.4"
|
|
48
44
|
},
|
|
49
45
|
"devDependencies": {
|
|
50
|
-
"@
|
|
51
|
-
"
|
|
46
|
+
"@types/chai": "^4.3.20",
|
|
47
|
+
"@types/chai-as-promised": "^7.1.8",
|
|
48
|
+
"@types/minimatch": "^5.1.2",
|
|
49
|
+
"@types/mocha": "^10.0.10",
|
|
50
|
+
"@types/node": "^24.0.0",
|
|
51
|
+
"@types/sinon": "^17.0.4",
|
|
52
|
+
"@types/sinon-chai": "^3.2.12",
|
|
52
53
|
"chai": "^4.4.1",
|
|
53
54
|
"chai-as-promised": "^7.1.1",
|
|
54
|
-
"eslint": "^
|
|
55
|
-
"eslint-config-
|
|
55
|
+
"eslint": "^9.39.4",
|
|
56
|
+
"eslint-config-tungsten-flat": "^0.2.0",
|
|
56
57
|
"mocha": "^9.2.2",
|
|
57
58
|
"mocha-steps": "^1.3.0",
|
|
58
59
|
"nodemon": "^2.0.22",
|
|
59
60
|
"sinon": "^12.0.1",
|
|
60
|
-
"sinon-chai": "^3.7.0"
|
|
61
|
+
"sinon-chai": "^3.7.0",
|
|
62
|
+
"typescript": "^6.0.3"
|
|
61
63
|
},
|
|
62
64
|
"scripts": {
|
|
63
|
-
"build": "
|
|
64
|
-
"build-once": "
|
|
65
|
+
"build": "tsc --watch",
|
|
66
|
+
"build-once": "tsc",
|
|
65
67
|
"dev": "cross-env NODE_OPTIONS=\"--experimental-specifier-resolution=node\" nodemon --experimental-specifier-resolution=node --watch dist/cli --watch dist/cli/lib --watch sxy-test-runner.config.js --watch sxy-loader.config.js dist/cli/index.js",
|
|
66
68
|
"dev-once": "nodemon --experimental-specifier-resolution=node --watch dist/cli --watch sxy-test-runner.config.js --watch sxy-loader.config.js dist/cli/index.js once",
|
|
69
|
+
"start": "cross-env NODE_OPTIONS=\"--experimental-specifier-resolution=node\" node --experimental-specifier-resolution=node dist/cli/index.js",
|
|
70
|
+
"once": "node --experimental-specifier-resolution=node dist/cli/index.js once",
|
|
71
|
+
"once:profile": "cross-env SXYT_TIME_PROFILING=true node --experimental-specifier-resolution=node dist/cli/index.js once",
|
|
67
72
|
"dev-init": "node --experimental-specifier-resolution=node dist/cli/index.js init",
|
|
68
73
|
"unit-test": "mocha --watch --parallel --config unitTesting/.mocharc.cjs --watch-files dist,unitTesting dist/**/*.unitTest.js",
|
|
69
74
|
"unit-tests": "unit-test",
|
|
@@ -87,7 +92,6 @@
|
|
|
87
92
|
"unit-test-add-exports": "mocha --watch --parallel --config unitTesting/.mocharc.cjs --watch-files dist,unitTesting dist/**/addExports.unitTest.js",
|
|
88
93
|
"unit-test-describe": "mocha --watch --parallel --config unitTesting/.mocharc.cjs --watch-files dist,unitTesting dist/**/describe.unitTest.js",
|
|
89
94
|
"unit-test-run-tests": "mocha --watch --parallel --config unitTesting/.mocharc.cjs --watch-files dist,unitTesting dist/**/runTests.unitTest.js",
|
|
90
|
-
"mocha-trial": "mocha --watch --parallel --config unitTesting/.mocharc.cjs --watch-files dist,unitTesting dist/**/runTest.unitTest.js"
|
|
91
|
-
"prepublish": "pnpm build-once"
|
|
95
|
+
"mocha-trial": "mocha --watch --parallel --config unitTesting/.mocharc.cjs --watch-files dist,unitTesting dist/**/runTest.unitTest.js"
|
|
92
96
|
}
|
|
93
97
|
}
|
package/dist/cli/files.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// import { watch } from './watch.js'
|
|
3
|
-
|
|
4
|
-
// // args: string[]
|
|
5
|
-
// export function files() {
|
|
6
|
-
// //const args = global.commandLineArguments
|
|
7
|
-
|
|
8
|
-
// if (args.length === 0) {
|
|
9
|
-
// return console.log(
|
|
10
|
-
// '`sxy-test-runner files` requires an argument which is a global pattern of test files to run'
|
|
11
|
-
// )
|
|
12
|
-
// }
|
|
13
|
-
// if (args.length > 1) {
|
|
14
|
-
// return console.log(
|
|
15
|
-
// '`sxy-test-runner files` only accepts 1 argument at present'
|
|
16
|
-
// )
|
|
17
|
-
// }
|
|
18
|
-
// const pattern = args[0]
|
|
19
|
-
// watch()
|
|
20
|
-
// }
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// import figures from 'figures'
|
|
3
|
-
|
|
4
|
-
// //import { applyConfigDefaults } from './lib/applyConfigDefaults.js'
|
|
5
|
-
// import { files } from './files.js'
|
|
6
|
-
|
|
7
|
-
// mochaDescribe('files command', function() {
|
|
8
|
-
|
|
9
|
-
// mochaIt('should fail with empty args', async function() {
|
|
10
|
-
// this.timeout(10000)
|
|
11
|
-
|
|
12
|
-
// const originalConsoleLog = console.log
|
|
13
|
-
// let consoleLogBuffer = ''
|
|
14
|
-
// console.log = sync(function testLog(...texts) {
|
|
15
|
-
// consoleLogBuffer += texts.join(' ') + '\n'
|
|
16
|
-
// })
|
|
17
|
-
|
|
18
|
-
// global.commandLineArguments = [
|
|
19
|
-
// '--config',
|
|
20
|
-
// 'unitTesting/watch/sxy-test-runner.config.js'
|
|
21
|
-
// ]
|
|
22
|
-
|
|
23
|
-
// promise( files([]) )
|
|
24
|
-
// await new Promise( (resolve, reject) => { setTimeout(resolve, 8000) } )
|
|
25
|
-
|
|
26
|
-
// console.log = originalConsoleLog
|
|
27
|
-
|
|
28
|
-
// //console.log(consoleLogBuffer)
|
|
29
|
-
// consoleLogBuffer.should.include( 'requires an argument' )
|
|
30
|
-
// })
|
|
31
|
-
|
|
32
|
-
// mochaIt('should fail with too many args', async function() {
|
|
33
|
-
// this.timeout(10000)
|
|
34
|
-
|
|
35
|
-
// const originalConsoleLog = console.log
|
|
36
|
-
// let consoleLogBuffer = ''
|
|
37
|
-
// console.log = sync(function testLog(...texts) {
|
|
38
|
-
// consoleLogBuffer += texts.join(' ') + '\n'
|
|
39
|
-
// })
|
|
40
|
-
|
|
41
|
-
// global.commandLineArguments = [
|
|
42
|
-
// '--config',
|
|
43
|
-
// 'unitTesting/watch/sxy-test-runner.config.js'
|
|
44
|
-
// ]
|
|
45
|
-
|
|
46
|
-
// promise( files(['a', 'b']) )
|
|
47
|
-
// await new Promise( (resolve, reject) => { setTimeout(resolve, 8000) } )
|
|
48
|
-
|
|
49
|
-
// console.log = originalConsoleLog
|
|
50
|
-
|
|
51
|
-
// //console.log(consoleLogBuffer)
|
|
52
|
-
// consoleLogBuffer.should.include( 'only accepts 1 argument' )
|
|
53
|
-
// })
|
|
54
|
-
|
|
55
|
-
// mochaIt('should run tests and output results and display correct tallies', async function() {
|
|
56
|
-
// this.timeout(10000)
|
|
57
|
-
|
|
58
|
-
// const originalConsoleLog = console.log
|
|
59
|
-
// let consoleLogBuffer = ''
|
|
60
|
-
// console.log = sync(function testLog(...texts) {
|
|
61
|
-
// consoleLogBuffer += texts.join(' ') + '\n'
|
|
62
|
-
// })
|
|
63
|
-
|
|
64
|
-
// global.commandLineArguments = [
|
|
65
|
-
// '--config',
|
|
66
|
-
// 'unitTesting/watch/sxy-test-runner.config.js'
|
|
67
|
-
// ]
|
|
68
|
-
|
|
69
|
-
// promise( files(['**/1.test.js']) )
|
|
70
|
-
// await new Promise( (resolve, reject) => { setTimeout(resolve, 8000) } )
|
|
71
|
-
|
|
72
|
-
// console.log = originalConsoleLog
|
|
73
|
-
|
|
74
|
-
// //console.log(consoleLogBuffer)
|
|
75
|
-
|
|
76
|
-
// const testFileName = `unitTesting/watch/1.test.js`
|
|
77
|
-
// const thing = 'Sample test 1'
|
|
78
|
-
// const should = '1 should equal 1'
|
|
79
|
-
|
|
80
|
-
// console.log(consoleLogBuffer)
|
|
81
|
-
|
|
82
|
-
// consoleLogBuffer.should.include( testFileName )
|
|
83
|
-
// consoleLogBuffer.should.include( thing )
|
|
84
|
-
// consoleLogBuffer.should.include( should )
|
|
85
|
-
// consoleLogBuffer.should.include( figures.tick )
|
|
86
|
-
|
|
87
|
-
// consoleLogBuffer.should.include( 'Tests: 1/1' )
|
|
88
|
-
// consoleLogBuffer.should.include( 'Items: 1/1' )
|
|
89
|
-
// consoleLogBuffer.should.include( 'Test Files: 1/1' )
|
|
90
|
-
|
|
91
|
-
// })
|
|
92
|
-
|
|
93
|
-
// /*
|
|
94
|
-
// mochaIt('should run tests and output results and display correct tallies', async function() {
|
|
95
|
-
// this.timeout(10000)
|
|
96
|
-
|
|
97
|
-
// const originalConsoleLog = console.log
|
|
98
|
-
// let consoleLogBuffer = ''
|
|
99
|
-
// console.log = sync(function testLog(...texts) {
|
|
100
|
-
// consoleLogBuffer += texts.join(' ') + '\n'
|
|
101
|
-
// })
|
|
102
|
-
|
|
103
|
-
// global.commandLineArguments = [
|
|
104
|
-
// '--config',
|
|
105
|
-
// 'unitTesting/watch/sxy-test-runner.config.js'
|
|
106
|
-
// ]
|
|
107
|
-
|
|
108
|
-
// promise( watch() )
|
|
109
|
-
// await new Promise( (resolve, reject) => { setTimeout(resolve, 8000) } )
|
|
110
|
-
|
|
111
|
-
// console.log = originalConsoleLog
|
|
112
|
-
|
|
113
|
-
// //console.log(consoleLogBuffer)
|
|
114
|
-
|
|
115
|
-
// const testFileName = `unitTesting/watch/1.test.js`
|
|
116
|
-
// const thing = 'Sample test 1'
|
|
117
|
-
// const should = '1 should equal 1'
|
|
118
|
-
|
|
119
|
-
// consoleLogBuffer.should.include( testFileName )
|
|
120
|
-
// consoleLogBuffer.should.include( thing )
|
|
121
|
-
// consoleLogBuffer.should.include( should )
|
|
122
|
-
// consoleLogBuffer.should.include( figures.tick )
|
|
123
|
-
|
|
124
|
-
// consoleLogBuffer.should.include( 'Tests: 3/3' )
|
|
125
|
-
// consoleLogBuffer.should.include( 'Items: 2/2' )
|
|
126
|
-
// consoleLogBuffer.should.include( 'Test Files: 2/2' )
|
|
127
|
-
|
|
128
|
-
// })
|
|
129
|
-
|
|
130
|
-
// mochaIt('should run tests and display correct tallies', async function() {
|
|
131
|
-
// this.timeout(10000)
|
|
132
|
-
|
|
133
|
-
// const originalConsoleLog = console.log
|
|
134
|
-
// let consoleLogBuffer = ''
|
|
135
|
-
// console.log = sync(function testLog(...texts) {
|
|
136
|
-
// consoleLogBuffer += texts.join(' ') + '\n'
|
|
137
|
-
// })
|
|
138
|
-
|
|
139
|
-
// global.commandLineArguments = [
|
|
140
|
-
// '--config',
|
|
141
|
-
// 'unitTesting/watch/sxy-test-runner.config.js'
|
|
142
|
-
// ]
|
|
143
|
-
|
|
144
|
-
// promise( watch() )
|
|
145
|
-
// await new Promise( (resolve, reject) => { setTimeout(resolve, 8000) } )
|
|
146
|
-
|
|
147
|
-
// console.log = originalConsoleLog
|
|
148
|
-
|
|
149
|
-
// //console.log(consoleLogBuffer)
|
|
150
|
-
|
|
151
|
-
// const testFileName = `unitTesting/watch/1.test.js`
|
|
152
|
-
// const thing = 'Sample test 1'
|
|
153
|
-
// const should = '1 should equal 1'
|
|
154
|
-
|
|
155
|
-
// consoleLogBuffer.should.include( testFileName )
|
|
156
|
-
// consoleLogBuffer.should.include( thing )
|
|
157
|
-
// consoleLogBuffer.should.include( should )
|
|
158
|
-
// consoleLogBuffer.should.include( figures.tick )
|
|
159
|
-
|
|
160
|
-
// })
|
|
161
|
-
|
|
162
|
-
// mochaIt('should warn us when there are no tests', async function() {
|
|
163
|
-
// this.timeout(6000)
|
|
164
|
-
|
|
165
|
-
// const originalConsoleLog = console.log
|
|
166
|
-
// let consoleLogBuffer = ''
|
|
167
|
-
// console.log = sync(function testLog(...texts) {
|
|
168
|
-
// consoleLogBuffer += texts.join(' ') + '\n'
|
|
169
|
-
// })
|
|
170
|
-
|
|
171
|
-
// global.commandLineArguments = [
|
|
172
|
-
// '--config',
|
|
173
|
-
// 'sxy-test-runner.no-tests.config.js'
|
|
174
|
-
// ]
|
|
175
|
-
|
|
176
|
-
// promise( watch() )
|
|
177
|
-
// await new Promise( (resolve, reject) => { setTimeout(resolve, 4000) } )
|
|
178
|
-
|
|
179
|
-
// console.log = originalConsoleLog
|
|
180
|
-
|
|
181
|
-
// //console.log('saved console.log output:')
|
|
182
|
-
// //console.log(consoleLogBuffer)
|
|
183
|
-
|
|
184
|
-
// consoleLogBuffer.should.include( 'no tests found' )
|
|
185
|
-
// consoleLogBuffer.should.not.include( 'describing' )
|
|
186
|
-
|
|
187
|
-
// })
|
|
188
|
-
|
|
189
|
-
// mochaIt('should not run tests when asked not to run initial tests', async function() {
|
|
190
|
-
// this.timeout(6000)
|
|
191
|
-
|
|
192
|
-
// const originalConsoleLog = console.log
|
|
193
|
-
// let consoleLogBuffer = ''
|
|
194
|
-
// console.log = sync(function testLog(...texts) {
|
|
195
|
-
// consoleLogBuffer += texts.join(' ') + '\n'
|
|
196
|
-
// })
|
|
197
|
-
|
|
198
|
-
// global.commandLineArguments = [
|
|
199
|
-
// '--config',
|
|
200
|
-
// 'sxy-test-runner.no-initial-tests.config.js'
|
|
201
|
-
// ]
|
|
202
|
-
|
|
203
|
-
// promise( watch() )
|
|
204
|
-
// await new Promise( (resolve, reject) => { setTimeout(resolve, 4000) } )
|
|
205
|
-
|
|
206
|
-
// console.log = originalConsoleLog
|
|
207
|
-
|
|
208
|
-
// //console.log('saved console.log output:')
|
|
209
|
-
// //console.log(consoleLogBuffer)
|
|
210
|
-
|
|
211
|
-
// //consoleLogBuffer.should.not.include( 'no tests found' ) // not sure - removing for now
|
|
212
|
-
// consoleLogBuffer.should.not.include( 'running initial tests' )
|
|
213
|
-
// consoleLogBuffer.should.not.include( 'describing' )
|
|
214
|
-
// consoleLogBuffer.should.include( 'watching' )
|
|
215
|
-
|
|
216
|
-
// })
|
|
217
|
-
|
|
218
|
-
// mochaIt('setup function and setup file from the config should have run', async function() {
|
|
219
|
-
// this.timeout(6000)
|
|
220
|
-
|
|
221
|
-
// global.configBasedSetupFunctionRan = false
|
|
222
|
-
// global.watchSetupFileHasRun = false
|
|
223
|
-
|
|
224
|
-
// const originalConsoleLog = console.log
|
|
225
|
-
// let consoleLogBuffer = ''
|
|
226
|
-
// console.log = sync(function testLog(...texts) {
|
|
227
|
-
// consoleLogBuffer += texts.join(' ') + '\n'
|
|
228
|
-
// })
|
|
229
|
-
|
|
230
|
-
// global.commandLineArguments = [
|
|
231
|
-
// '--config',
|
|
232
|
-
// 'sxy-test-runner.setup-tasks.config.js'
|
|
233
|
-
// ]
|
|
234
|
-
|
|
235
|
-
// promise( watch() )
|
|
236
|
-
// await new Promise( (resolve, reject) => {
|
|
237
|
-
// setTimeout(resolve, 2000)
|
|
238
|
-
// } )
|
|
239
|
-
|
|
240
|
-
// console.log = originalConsoleLog
|
|
241
|
-
|
|
242
|
-
// global.configBasedSetupFunctionRan.should.equal(true)
|
|
243
|
-
// global.watchSetupFileHasRun.should.equal(true)
|
|
244
|
-
|
|
245
|
-
// })*/
|
|
246
|
-
// })
|
|
File without changes
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { defaultConfig } from './defaultConfig.js';
|
|
2
|
-
|
|
3
|
-
// applyConfigDefaults( userConfig: {} )
|
|
4
|
-
|
|
5
|
-
await mochaDescribe('the defaultConfig', async function () {
|
|
6
|
-
await mochaIt('has sensible defaults', async function () {
|
|
7
|
-
await defaultConfig.should.include.keys(['tests', 'testsIgnore', 'watch']);
|
|
8
|
-
});
|
|
9
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
|
|
4
|
-
I can't remember what this was for.
|
|
5
|
-
|
|
6
|
-
Would need updating to the new file load system if used
|
|
7
|
-
|
|
8
|
-
import { createTimeProfiler } from 'sxy-dev-tools'
|
|
9
|
-
import { packageName, cliName, configFileName, configLocations, showTimeProfiling } from '../../config.js'
|
|
10
|
-
import { join } from 'path'
|
|
11
|
-
const { timeProfileAsync } = createTimeProfiler(showTimeProfiling)
|
|
12
|
-
|
|
13
|
-
// could be used within runTests
|
|
14
|
-
// think its not used now
|
|
15
|
-
|
|
16
|
-
export function loadTestFileStatic(config, testFile) {
|
|
17
|
-
|
|
18
|
-
return timeProfileAsync(`load test ${testFile} statically (standard import)`, () => {
|
|
19
|
-
|
|
20
|
-
//console.log('loadTestFileStatic', config, testFile)
|
|
21
|
-
|
|
22
|
-
const projectDir = process.cwd()
|
|
23
|
-
|
|
24
|
-
global.testState = {
|
|
25
|
-
describes: [],
|
|
26
|
-
describeCounter: 1
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
import( 'file://' + join(projectDir, testFile) )
|
|
30
|
-
|
|
31
|
-
const test = {
|
|
32
|
-
file: testFile,
|
|
33
|
-
describes: global.testState.describes
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return test
|
|
37
|
-
|
|
38
|
-
} )
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
*/
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
import { loadTestFileStatic } from "./loadTestFileStatic.js"
|
|
4
|
-
import { applyConfigDefaults } from './applyConfigDefaults.js'
|
|
5
|
-
|
|
6
|
-
// loadTestFile(config, testFile) ???
|
|
7
|
-
|
|
8
|
-
mochaDescribe('loadTestFileStatic() function', function() {
|
|
9
|
-
|
|
10
|
-
mochaIt('should load a test file, retreiving describes', function() {
|
|
11
|
-
|
|
12
|
-
const config = applyConfigDefaults({})
|
|
13
|
-
|
|
14
|
-
const sampleTestFile = 'unitTesting/sampleTests/1.test.js'
|
|
15
|
-
|
|
16
|
-
const test = loadTestFileStatic(config, sampleTestFile)
|
|
17
|
-
|
|
18
|
-
test.describes.length.should.equal(1)
|
|
19
|
-
test.describes[0].counter.should.equal(1)
|
|
20
|
-
test.describes[0].its[0].counter.should.equal(1)
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
// mochaIt('should be able to load a test file again, after cache is cleard', function() {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// })
|
|
28
|
-
|
|
29
|
-
})
|
|
30
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//import { processWatchEvent } from './processWatchEvent.js'
|
|
4
|
-
|
|
5
|
-
// parseCommandLineArguments(allowedArguments)
|
|
6
|
-
|
|
7
|
-
// mochaDescribe('processWatchEvent() function', function() {
|
|
8
|
-
|
|
9
|
-
// mochaIt('identifies a test in a watch event', function() {
|
|
10
|
-
|
|
11
|
-
// processWatchEvent('watchTests/a.test.js', 'update')
|
|
12
|
-
|
|
13
|
-
// })
|
|
14
|
-
|
|
15
|
-
// })
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { timeProfileAsync } from './timeProfier.js';
|
|
2
|
-
import { runTasks } from './runTasks.js';
|
|
3
|
-
import { addExports } from './addExports.js';
|
|
4
|
-
import { debug } from '../../output.js';
|
|
5
|
-
import { runIt } from './runIt.js';
|
|
6
|
-
export async function runDescribeOld(config, describe) {
|
|
7
|
-
return await timeProfileAsync(`run describe ${describe.thing}`, async () => {
|
|
8
|
-
let itCounter = 1;
|
|
9
|
-
const its = [];
|
|
10
|
-
|
|
11
|
-
// create functions to pass back
|
|
12
|
-
|
|
13
|
-
// afterDescribe
|
|
14
|
-
let afterDescribeFunc;
|
|
15
|
-
async function afterDescribe(func) {
|
|
16
|
-
if (typeof func !== 'function') {
|
|
17
|
-
throw new Error(`afterDescribe() error, argument passed to afterDescribe() must be a function,` + ` received ${typeof func}`);
|
|
18
|
-
}
|
|
19
|
-
afterDescribeFunc = func;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// beforeEachTest
|
|
23
|
-
let beforeEachTestFunc;
|
|
24
|
-
async function beforeEachTest(func) {
|
|
25
|
-
if (typeof func !== 'function') {
|
|
26
|
-
throw new Error(`afterDescribe() error, argument passed to afterDescribe() must be a function,` + ` received ${typeof func}`);
|
|
27
|
-
}
|
|
28
|
-
beforeEachTestFunc = func;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// afterEachTest
|
|
32
|
-
let afterEachTestFunc;
|
|
33
|
-
async function afterEachTest(func) {
|
|
34
|
-
if (typeof func !== 'function') {
|
|
35
|
-
throw new Error(`afterDescribe() error, argument passed to afterDescribe() must be a function,` + ` received ${typeof func}`);
|
|
36
|
-
}
|
|
37
|
-
afterEachTestFunc = func;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// it
|
|
41
|
-
async function it(should, test) {
|
|
42
|
-
const thisItCounter = itCounter++;
|
|
43
|
-
await its.push({
|
|
44
|
-
counter: thisItCounter,
|
|
45
|
-
should,
|
|
46
|
-
test
|
|
47
|
-
//beforeEachTestExports
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
const test = it;
|
|
51
|
-
const describeExports = {};
|
|
52
|
-
await configBeforeEachDescribe(config, describeExports);
|
|
53
|
-
const describeParcel = {
|
|
54
|
-
it,
|
|
55
|
-
test,
|
|
56
|
-
afterDescribe,
|
|
57
|
-
beforeEachTest,
|
|
58
|
-
afterEachTest
|
|
59
|
-
};
|
|
60
|
-
await addExports(describeParcel, describeExports);
|
|
61
|
-
await describe.tests(describeParcel);
|
|
62
|
-
|
|
63
|
-
//console.log('its', its)
|
|
64
|
-
|
|
65
|
-
// const beforeEachDescribeExports = (config.beforeEachDescribe)
|
|
66
|
-
// ? runTasks(config, config.beforeEachDescribe)
|
|
67
|
-
// : {}
|
|
68
|
-
|
|
69
|
-
//const thisDescribeCounter = describeCounter++ // assign THEN increment
|
|
70
|
-
//let itCounter = 1
|
|
71
|
-
const itResults = [];
|
|
72
|
-
for (const it of its) {
|
|
73
|
-
await itResults.push(await runIt(config, it, beforeEachTestFunc, afterEachTestFunc));
|
|
74
|
-
}
|
|
75
|
-
const itResultsSummary = {
|
|
76
|
-
total: 0,
|
|
77
|
-
passes: 0
|
|
78
|
-
};
|
|
79
|
-
for (const itResult of itResults) {
|
|
80
|
-
itResultsSummary.total += +(itResult.success !== null);
|
|
81
|
-
itResultsSummary.passes += +itResult.success;
|
|
82
|
-
}
|
|
83
|
-
await debug('itResultsSummary', itResultsSummary);
|
|
84
|
-
const describeResult = {
|
|
85
|
-
counter: describe.counter,
|
|
86
|
-
thing: describe.thing,
|
|
87
|
-
success: itResultsSummary.total > 0 ? itResultsSummary.passes === itResultsSummary.total : null,
|
|
88
|
-
itResults,
|
|
89
|
-
itResultsSummary
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// run after
|
|
93
|
-
if (typeof afterDescribeFunc === 'function') await afterDescribeFunc();
|
|
94
|
-
await configAfterEachDescribe(config, describeExports);
|
|
95
|
-
return describeResult;
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
async function configBeforeEachDescribe(config, exports) {
|
|
99
|
-
if (config.beforeEachDescribe) {
|
|
100
|
-
const theExports = await runTasks(config.beforeEachDescribe, undefined);
|
|
101
|
-
await addExports(exports, theExports);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
async function configAfterEachDescribe(config, exports) {
|
|
105
|
-
if (config.afterEachDescribe) {
|
|
106
|
-
await runTasks(config.afterEachDescribe, exports);
|
|
107
|
-
}
|
|
108
|
-
}
|