sxy-test-runner 1.4.5 → 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.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +24 -22
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +2 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +41 -91
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/lib/addBasePath.d.ts +3 -0
- package/dist/cli/lib/addBasePath.d.ts.map +1 -0
- package/dist/cli/lib/addBasePath.js +12 -14
- package/dist/cli/lib/addBasePath.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/addExports.d.ts.map +1 -0
- package/dist/cli/lib/addExports.js +13 -11
- package/dist/cli/lib/addExports.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/applyConfigDefaults.d.ts.map +1 -0
- package/dist/cli/lib/applyConfigDefaults.js +6 -42
- package/dist/cli/lib/applyConfigDefaults.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/buildDependencyTree.d.ts.map +1 -0
- package/dist/cli/lib/buildDependencyTree.js +23 -34
- package/dist/cli/lib/buildDependencyTree.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/buildDependencyTrees.d.ts.map +1 -0
- package/dist/cli/lib/buildDependencyTrees.js +15 -34
- package/dist/cli/lib/buildDependencyTrees.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/defaultConfig.d.ts.map +1 -0
- package/dist/cli/lib/defaultConfig.js +23 -21
- package/dist/cli/lib/defaultConfig.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/doUserSetup.d.ts.map +1 -0
- package/dist/cli/lib/doUserSetup.js +20 -23
- package/dist/cli/lib/doUserSetup.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/doUserTeardown.d.ts.map +1 -0
- package/dist/cli/lib/doUserTeardown.js +21 -23
- package/dist/cli/lib/doUserTeardown.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/findTestFiles.d.ts.map +1 -0
- package/dist/cli/lib/findTestFiles.js +16 -24
- package/dist/cli/lib/findTestFiles.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/getAllowedFlags.d.ts.map +1 -0
- package/dist/cli/lib/getAllowedFlags.js +10 -8
- package/dist/cli/lib/getAllowedFlags.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/globArgCombine.d.ts.map +1 -0
- package/dist/cli/lib/globArgCombine.js +8 -1
- package/dist/cli/lib/globArgCombine.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/injectProperties.d.ts.map +1 -0
- package/dist/cli/lib/injectProperties.js +10 -10
- package/dist/cli/lib/injectProperties.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/loadConfig.d.ts.map +1 -0
- package/dist/cli/lib/loadConfig.js +14 -18
- package/dist/cli/lib/loadConfig.js.map +1 -0
- 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.d.ts +4 -0
- package/dist/cli/lib/loadTestFile.d.ts.map +1 -0
- package/dist/cli/lib/loadTestFile.js +48 -78
- package/dist/cli/lib/loadTestFile.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/parseCommandLineArguments.d.ts.map +1 -0
- package/dist/cli/lib/parseCommandLineArguments.js +48 -42
- package/dist/cli/lib/parseCommandLineArguments.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/parseDescribe.d.ts.map +1 -0
- package/dist/cli/lib/parseDescribe.js +67 -81
- package/dist/cli/lib/parseDescribe.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/runDescribe.d.ts.map +1 -0
- package/dist/cli/lib/runDescribe.js +39 -39
- package/dist/cli/lib/runDescribe.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/runDescribeRun.d.ts.map +1 -0
- package/dist/cli/lib/runDescribeRun.js +34 -49
- package/dist/cli/lib/runDescribeRun.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/runIt.d.ts.map +1 -0
- package/dist/cli/lib/runIt.js +59 -69
- package/dist/cli/lib/runIt.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/runTasks.d.ts.map +1 -0
- package/dist/cli/lib/runTasks.js +28 -31
- package/dist/cli/lib/runTasks.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/runTest.d.ts.map +1 -0
- package/dist/cli/lib/runTest.js +54 -66
- package/dist/cli/lib/runTest.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/runTests.d.ts.map +1 -0
- package/dist/cli/lib/runTests.js +123 -141
- package/dist/cli/lib/runTests.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/showTestLoadingError.d.ts.map +1 -0
- package/dist/cli/lib/showTestLoadingError.js +22 -33
- package/dist/cli/lib/showTestLoadingError.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/showTestResult.d.ts.map +1 -0
- package/dist/cli/lib/showTestResult.js +88 -88
- package/dist/cli/lib/showTestResult.js.map +1 -0
- 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.d.ts +3 -0
- package/dist/cli/lib/timeProfier.d.ts.map +1 -0
- package/dist/cli/lib/timeProfier.js +4 -6
- package/dist/cli/lib/timeProfier.js.map +1 -0
- package/dist/cli/lib/validateConfig.d.ts +3 -0
- package/dist/cli/lib/validateConfig.d.ts.map +1 -0
- package/dist/cli/lib/validateConfig.js +21 -24
- package/dist/cli/lib/validateConfig.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/cli/lib/watchFilesAndRunTests.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesAndRunTests.js +2 -3
- package/dist/cli/lib/watchFilesAndRunTests.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.js +99 -127
- package/dist/cli/lib/watchFilesAndRunTestsChokidar.js.map +1 -0
- 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 +3 -0
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js +108 -148
- package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js.map +1 -0
- 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.d.ts +4 -0
- package/dist/cli/lib/watchFilesChokidar.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesChokidar.js +30 -56
- package/dist/cli/lib/watchFilesChokidar.js.map +1 -0
- 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.d.ts +7 -0
- package/dist/cli/lib/watchFilesNodeWatch.d.ts.map +1 -0
- package/dist/cli/lib/watchFilesNodeWatch.js +31 -41
- package/dist/cli/lib/watchFilesNodeWatch.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/cli/once.d.ts.map +1 -0
- package/dist/cli/once.js +35 -42
- package/dist/cli/once.js.map +1 -0
- package/dist/cli/watch.d.ts +2 -0
- package/dist/cli/watch.d.ts.map +1 -0
- package/dist/cli/watch.js +64 -114
- package/dist/cli/watch.js.map +1 -0
- 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 +7 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +13 -2
- package/dist/config.js.map +1 -0
- package/dist/describe.d.ts +3 -0
- package/dist/describe.d.ts.map +1 -0
- package/dist/describe.js +20 -34
- package/dist/describe.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -0
- package/dist/indexNumberToLetters.d.ts +2 -0
- package/dist/indexNumberToLetters.d.ts.map +1 -0
- package/dist/indexNumberToLetters.js +12 -11
- package/dist/indexNumberToLetters.js.map +1 -0
- package/dist/output.d.ts +6 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +16 -18
- package/dist/output.js.map +1 -0
- 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 +138 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- 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/testsState.js +0 -5
- package/dist/timeProfiling.js +0 -9
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { loadConfig } from
|
|
2
|
-
|
|
1
|
+
import { loadConfig } from './loadConfig.js';
|
|
3
2
|
// loadConfig(location)
|
|
4
|
-
// location is
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
3
|
+
// location is optional
|
|
4
|
+
mochaDescribe('loadConfig() function', function () {
|
|
5
|
+
mochaIt('loads a user config', async function () {
|
|
6
|
+
const userConfig = await loadConfig();
|
|
7
|
+
userConfig.should.not.be.null;
|
|
8
|
+
});
|
|
9
|
+
mochaIt('loads a user config from a location passed to it', async function () {
|
|
10
|
+
const configLocation = 'unitTesting/sampleConfig/sxy-test-runner.config.js';
|
|
11
|
+
const userConfig = await loadConfig(configLocation);
|
|
12
|
+
userConfig.should.not.be.null;
|
|
13
|
+
userConfig.tests?.should.equal('alt-config-location');
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=loadConfig.unitTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadConfig.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/loadConfig.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,uBAAuB;AACvB,uBAAuB;AACvB,aAAa,CAAC,uBAAuB,EAAE;IACnC,OAAO,CAAC,qBAAqB,EAAE,KAAK;QAChC,MAAM,UAAU,GAAG,MAAM,UAAU,EAAE,CAAA;QAErC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA;IACjC,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,kDAAkD,EAAE,KAAK;QAC7D,MAAM,cAAc,GAAG,oDAAoD,CAAA;QAC3E,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,cAAc,CAAC,CAAA;QAEnD,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA;QAC7B,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACzD,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadTestFile.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/loadTestFile.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,CAAA;AAInB,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAWtD,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAoDtF"}
|
|
@@ -1,88 +1,58 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
|
-
import chalk from 'chalk
|
|
3
|
-
import { createTimeProfiler } from '
|
|
2
|
+
import chalk from '../../packages/chalk.js';
|
|
3
|
+
import { createTimeProfiler } from '../../packages/timeProfiler.js';
|
|
4
4
|
import 'esm-reload'; // registers import reload hook
|
|
5
|
-
|
|
6
5
|
import { showTimeProfiling } from '../../config.js';
|
|
7
|
-
import {
|
|
8
|
-
const {
|
|
9
|
-
timeProfileAsync
|
|
10
|
-
} = await createTimeProfiler(showTimeProfiling);
|
|
11
|
-
|
|
12
|
-
//import { load } from './load.js.depr/index.js'
|
|
13
|
-
|
|
6
|
+
import { debug } from '../../output.js';
|
|
7
|
+
const { timeProfileAsync } = createTimeProfiler(showTimeProfiling);
|
|
14
8
|
let loading = null;
|
|
15
9
|
let importIteration = 1;
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
function importFresh(target) {
|
|
11
|
+
return import(target + `?instance=${importIteration++}`);
|
|
18
12
|
}
|
|
19
13
|
export async function loadTestFile(config, testFile) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
const loadPromise = timeProfileAsync(`load test ${testFile}`, async () => {
|
|
26
|
-
const projectDir = await process.cwd();
|
|
27
|
-
|
|
28
|
-
// eslint-disable-next-line camelcase
|
|
29
|
-
global.__sxy_test_runner__ = {
|
|
30
|
-
describes: [],
|
|
31
|
-
describeCounter: 1
|
|
32
|
-
};
|
|
33
|
-
const testFileFullUrl = 'file://' + (await join(projectDir, testFile));
|
|
34
|
-
|
|
35
|
-
//console.log('testFileFullUrl', testFileFullUrl)
|
|
36
|
-
|
|
37
|
-
const test = {
|
|
38
|
-
file: testFile
|
|
39
|
-
};
|
|
40
|
-
const capturingConsoleLog = config.execution.files === 'sequential';
|
|
41
|
-
|
|
42
|
-
//// capture console.log output
|
|
43
|
-
let previousConsoleLog;
|
|
44
|
-
const logs = [];
|
|
45
|
-
if (capturingConsoleLog) {
|
|
46
|
-
previousConsoleLog = console.log; // eslint-disable-line no-console
|
|
47
|
-
console.log = async (...texts) => await logs.push(texts); // eslint-disable-line no-console
|
|
14
|
+
if (loading !== null) {
|
|
15
|
+
debug(chalk.yellow `loadTestFile - another file is loading - waiting for it to finish`);
|
|
16
|
+
await loading;
|
|
17
|
+
debug(chalk.yellow `previous file complete - will now load the file`);
|
|
48
18
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
test.describes = global.__sxy_test_runner__.describes;
|
|
63
|
-
test.error = false;
|
|
64
|
-
} catch (e) {
|
|
65
|
-
//error(chalk.red`Error loading file ${testFileFullUrl}`)
|
|
66
|
-
test.error = `Error loading file\n${e}`;
|
|
67
|
-
} finally {
|
|
68
|
-
test.logs = logs;
|
|
69
|
-
//// restore previous console.log function
|
|
70
|
-
if (capturingConsoleLog) {
|
|
19
|
+
const loadPromise = timeProfileAsync(`load test ${testFile}`, async () => {
|
|
20
|
+
const projectDir = process.cwd();
|
|
21
|
+
// eslint-disable-next-line camelcase
|
|
22
|
+
global.__sxy_test_runner__ = {
|
|
23
|
+
describes: [],
|
|
24
|
+
describeCounter: 1
|
|
25
|
+
};
|
|
26
|
+
const testFileFullUrl = 'file://' + join(projectDir, testFile);
|
|
27
|
+
const test = { file: testFile };
|
|
28
|
+
const capturingConsoleLog = config.execution.files === 'sequential';
|
|
29
|
+
//// capture console.log output
|
|
30
|
+
let previousConsoleLog;
|
|
31
|
+
const logs = [];
|
|
71
32
|
if (capturingConsoleLog) {
|
|
72
|
-
|
|
33
|
+
previousConsoleLog = console.log; // eslint-disable-line no-console
|
|
34
|
+
console.log = (...texts) => { logs.push(texts); }; // eslint-disable-line no-console
|
|
73
35
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
36
|
+
////
|
|
37
|
+
try {
|
|
38
|
+
await importFresh(testFileFullUrl);
|
|
39
|
+
test.describes = global.__sxy_test_runner__?.describes ?? [];
|
|
40
|
+
test.error = false;
|
|
41
|
+
}
|
|
42
|
+
catch (e) {
|
|
43
|
+
test.error = `Error loading file\n${String(e)}`;
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
test.logs = logs;
|
|
47
|
+
//// restore previous console.log function
|
|
48
|
+
if (capturingConsoleLog && previousConsoleLog) {
|
|
49
|
+
console.log = previousConsoleLog; // eslint-disable-line no-console
|
|
50
|
+
}
|
|
51
|
+
////
|
|
52
|
+
}
|
|
53
|
+
return test;
|
|
54
|
+
});
|
|
55
|
+
loading = loadPromise;
|
|
56
|
+
return await loadPromise;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=loadTestFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadTestFile.js","sourceRoot":"","sources":["../../../src/cli/lib/loadTestFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,KAAK,MAAM,yBAAyB,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,YAAY,CAAA,CAAC,+BAA+B;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAGvC,MAAM,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAElE,IAAI,OAAO,GAA6B,IAAI,CAAA;AAE5C,IAAI,eAAe,GAAG,CAAC,CAAA;AACvB,SAAS,WAAW,CAAC,MAAc;IAC/B,OAAO,MAAM,CAAC,MAAM,GAAG,aAAa,eAAe,EAAE,EAAE,CAAC,CAAA;AAC5D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,QAAgB;IAC/D,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACnB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAA,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,CAAC;YACP,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;YAChB,0CAA0C;YAC1C,IAAI,mBAAmB,IAAI,kBAAkB,EAAE,CAAC;gBAC5C,OAAO,CAAC,GAAG,GAAG,kBAAkB,CAAA,CAAC,iCAAiC;YACtE,CAAC;YACD,IAAI;QACR,CAAC;QAED,OAAO,IAAI,CAAA;IACf,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,WAAW,CAAA;IAErB,OAAO,MAAM,WAAW,CAAA;AAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadTestFile.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/loadTestFile.unitTest.ts"],"names":[],"mappings":""}
|
|
@@ -1,50 +1,13 @@
|
|
|
1
|
-
import { loadTestFile } from
|
|
1
|
+
import { loadTestFile } from './loadTestFile.js';
|
|
2
2
|
import { defaultConfig } from './defaultConfig.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
await
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const test = loadTestFile(config, sampleTestFile)
|
|
15
|
-
|
|
16
|
-
test.describes.length.should.equal(1)
|
|
17
|
-
test.describes.at(-1).counter.should.equal(1)
|
|
18
|
-
test.describes[0].tests.should.be.a('function')
|
|
19
|
-
//test.describes.at(-1).its.at(-1).counter.should.equal(1)
|
|
20
|
-
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
mochaIt('should correctly load a second test file', function() {
|
|
24
|
-
|
|
25
|
-
const config = defaultConfig
|
|
26
|
-
|
|
27
|
-
const sampleTestFile = 'unitTesting/sampleTests/2.test.js'
|
|
28
|
-
|
|
29
|
-
const test = loadTestFile(config, sampleTestFile)
|
|
30
|
-
|
|
31
|
-
test.describes.length.should.equal(1)
|
|
32
|
-
test.describes.at(-1).counter.should.equal(1)
|
|
33
|
-
test.describes[0].tests.should.be.a('function')
|
|
34
|
-
//test.describes.at(-1).its.at(-1).counter.should.equal(2)
|
|
35
|
-
|
|
36
|
-
})
|
|
37
|
-
*/
|
|
38
|
-
await mochaIt('should correctly load a file with describes without any its/tests', async function () {
|
|
39
|
-
const config = defaultConfig;
|
|
40
|
-
const sampleTestFile = 'unitTesting/sampleTests/describesWithoutTests.test.js';
|
|
41
|
-
const test = await loadTestFile(config, sampleTestFile);
|
|
42
|
-
|
|
43
|
-
//console.log('ut test', test)
|
|
44
|
-
|
|
45
|
-
await test.describes.length.should.equal(2);
|
|
46
|
-
await (await test.describes.at(-1)).counter.should.equal(2);
|
|
47
|
-
await test.describes[0].tests.should.be.a('function');
|
|
48
|
-
//test.describes.at(-1).its.at(-1).counter.should.equal(2)
|
|
49
|
-
});
|
|
50
|
-
});
|
|
3
|
+
mochaDescribe('loadTestFile() function', function () {
|
|
4
|
+
mochaIt('should correctly load a file with describes without any its/tests', async function () {
|
|
5
|
+
const sampleTestFile = 'unitTesting/sampleTests/describesWithoutTests.test.js';
|
|
6
|
+
const test = await loadTestFile(defaultConfig, sampleTestFile);
|
|
7
|
+
const describes = test.describes ?? [];
|
|
8
|
+
describes.length.should.equal(2);
|
|
9
|
+
describes.at(-1)?.counter.should.equal(2);
|
|
10
|
+
describes[0]?.tests.should.be.a('function');
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=loadTestFile.unitTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadTestFile.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/loadTestFile.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,aAAa,CAAC,yBAAyB,EAAE;IACrC,OAAO,CAAC,mEAAmE,EAAE,KAAK;QAC9E,MAAM,cAAc,GAAG,uDAAuD,CAAA;QAE9E,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;QAE9D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,CAAA;QACtC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAChC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACzC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;IAC/C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseCommandLineArguments.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/parseCommandLineArguments.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIvE,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,eAAe,CA2C7F"}
|
|
@@ -1,49 +1,55 @@
|
|
|
1
1
|
// watch:
|
|
2
2
|
// once:
|
|
3
3
|
// // --config configLocation
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import { packageName, cliName, configFileName, configLocations, showTimeProfiling } from '../../config.js';
|
|
7
|
-
import { join } from 'path';
|
|
8
|
-
import { out, log, debug } from '../../output.js';
|
|
9
|
-
const {
|
|
10
|
-
timeProfileAsync
|
|
11
|
-
} = await createTimeProfiler(showTimeProfiling);
|
|
4
|
+
import { packageName } from '../../config.js';
|
|
5
|
+
import { log } from '../../output.js';
|
|
12
6
|
import { getAllowedFlags } from './getAllowedFlags.js';
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
export function parseCommandLineArguments(allowedArguments) {
|
|
8
|
+
const allowedFlags = getAllowedFlags(allowedArguments);
|
|
9
|
+
const returnArgs = {};
|
|
10
|
+
for (let position = 0; position < commandLineArguments.length; position++) {
|
|
11
|
+
const arg = commandLineArguments[position];
|
|
12
|
+
if (arg === undefined)
|
|
13
|
+
continue;
|
|
14
|
+
if (arg.slice(0, 2) === '--') {
|
|
15
|
+
const longFlag = arg.slice(2);
|
|
16
|
+
const allowedArgument = allowedArguments[longFlag];
|
|
17
|
+
if (allowedArgument) {
|
|
18
|
+
if (allowedArgument.hasValue) {
|
|
19
|
+
const value = commandLineArguments[++position];
|
|
20
|
+
if (value !== undefined)
|
|
21
|
+
returnArgs[longFlag] = value;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
returnArgs[longFlag] = true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
log(`[${packageName}] Unknown option ${longFlag}`);
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
else if (arg.slice(0, 1) === '-') {
|
|
32
|
+
const shortFlag = arg.slice(1);
|
|
33
|
+
const longFlag = allowedFlags[shortFlag];
|
|
34
|
+
if (longFlag !== undefined) {
|
|
35
|
+
if (longFlag in returnArgs) {
|
|
36
|
+
log(`[${packageName}] Option ${longFlag} already set, being overwritten by ${shortFlag}`);
|
|
37
|
+
}
|
|
38
|
+
const allowedArgument = allowedArguments[longFlag];
|
|
39
|
+
if (allowedArgument?.hasValue === true) {
|
|
40
|
+
const value = commandLineArguments[++position];
|
|
41
|
+
if (value !== undefined)
|
|
42
|
+
returnArgs[longFlag] = value;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
returnArgs[longFlag] = true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
log(`[${packageName}] Unknown flag ${shortFlag}`);
|
|
50
|
+
}
|
|
36
51
|
}
|
|
37
|
-
if (allowedArguments[longFlag].hasValue) {
|
|
38
|
-
const value = commandLineArguments[++position]; // increment position
|
|
39
|
-
returnArgs[longFlag] = value;
|
|
40
|
-
} else {
|
|
41
|
-
returnArgs[longFlag] = true;
|
|
42
|
-
}
|
|
43
|
-
} else {
|
|
44
|
-
await log(`[${packageName}] Unknown flag ${shortFlag}`);
|
|
45
|
-
}
|
|
46
52
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
return returnArgs;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=parseCommandLineArguments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseCommandLineArguments.js","sourceRoot":"","sources":["../../../src/cli/lib/parseCommandLineArguments.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,QAAQ;AACR,6BAA6B;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAGrC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,MAAM,UAAU,yBAAyB,CAAC,gBAAkC;IACxE,MAAM,YAAY,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAA;IAEtD,MAAM,UAAU,GAAoB,EAAE,CAAA;IAEtC,KAAK,IAAI,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,oBAAoB,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;QACxE,MAAM,GAAG,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAA;QAC1C,IAAI,GAAG,KAAK,SAAS;YAAE,SAAQ;QAC/B,IAAI,GAAG,CAAC,KAAK,C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CAAC,GAAG,KAAK,CAAA;gBACzD,CAAC;qBAAM,CAAC;oBACJ,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAA;gBAC/B,CAAC;YACL,CAAC;iBAAM,CAAC;gBACJ,GAAG,CAAC,IAAI,WAAW,kBAAkB,SAAS,EAAE,CAAC,CAAA;YACrD,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,UAAU,CAAA;AACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseCommandLineArguments.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/parseCommandLineArguments.unitTest.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { parseCommandLineArguments } from './parseCommandLineArguments.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
});
|
|
2
|
+
mochaDescribe('getAllowedFlags() function', function () {
|
|
3
|
+
mochaIt('extracts the flags from an allowedArguments object', function () {
|
|
4
|
+
const allowedArguments = {
|
|
5
|
+
config: {
|
|
6
|
+
flag: 'c',
|
|
7
|
+
hasValue: true
|
|
8
|
+
},
|
|
9
|
+
watch: {
|
|
10
|
+
flag: 'w',
|
|
11
|
+
hasValue: false
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
global.commandLineArguments = [
|
|
15
|
+
'--config',
|
|
16
|
+
'foo bar'
|
|
17
|
+
];
|
|
18
|
+
const parsedArgs = parseCommandLineArguments(allowedArguments);
|
|
19
|
+
parsedArgs.should.have.key('config');
|
|
20
|
+
parsedArgs.config?.should.equal('foo bar');
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=parseCommandLineArguments.unitTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseCommandLineArguments.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/parseCommandLineArguments.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAG1E,aAAa,CAAC,4BAA4B,EAAE;IACxC,OAAO,CAAC,oDAAoD,EAAE;QAC1D,MAAM,gBAAgB,GAAqB;YACvC,MAAM,EAAE;gBACJ,IAAI,EAAE,GAAG;gBACT,QAAQ,EAAE,IAAI;aACjB;YACD,KAAK,EAAE;gBACH,IAAI,EAAE,GAAG;gBACT,QAAQ,EAAE,KAAK;aAClB;SACJ,CAAA;QAED,MAAM,CAAC,oBAAoB,GAAG;YAC1B,UAAU;YACV,SAAS;SACZ,CAAA;QAED,MAAM,UAAU,GAAG,yBAAyB,CAAC,gBAAgB,CAAC,CAAA;QAE9D,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QACpC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseDescribe.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/parseDescribe.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAsB,cAAc,EAAe,MAAM,gBAAgB,CAAA;AAEvG,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAqEzF"}
|
|
@@ -1,87 +1,73 @@
|
|
|
1
1
|
import { timeProfileAsync } from './timeProfier.js';
|
|
2
2
|
import { runTasks } from './runTasks.js';
|
|
3
3
|
import { addExports } from './addExports.js';
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
error = e;
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
its,
|
|
69
|
-
beforeDescribeExports,
|
|
70
|
-
afterDescribeFunc,
|
|
71
|
-
beforeEachTestFunc,
|
|
72
|
-
afterEachTestFunc,
|
|
73
|
-
error
|
|
74
|
-
};
|
|
75
|
-
});
|
|
4
|
+
export function parseDescribe(config, describe) {
|
|
5
|
+
return timeProfileAsync(`parse its from describe ${describe.thing}`, async () => {
|
|
6
|
+
let itCounter = 1;
|
|
7
|
+
const its = [];
|
|
8
|
+
// create functions to pass back
|
|
9
|
+
// afterDescribe
|
|
10
|
+
let afterDescribeFunc;
|
|
11
|
+
function afterDescribe(func) {
|
|
12
|
+
if (typeof func !== 'function') {
|
|
13
|
+
throw new Error('afterDescribe() error, argument passed to afterDescribe() must be a function,'
|
|
14
|
+
+ ` received ${typeof func}`);
|
|
15
|
+
}
|
|
16
|
+
afterDescribeFunc = func;
|
|
17
|
+
}
|
|
18
|
+
// beforeEachTest
|
|
19
|
+
let beforeEachTestFunc;
|
|
20
|
+
function beforeEachTest(func) {
|
|
21
|
+
if (typeof func !== 'function') {
|
|
22
|
+
throw new Error('afterDescribe() error, argument passed to afterDescribe() must be a function,'
|
|
23
|
+
+ ` received ${typeof func}`);
|
|
24
|
+
}
|
|
25
|
+
beforeEachTestFunc = func;
|
|
26
|
+
}
|
|
27
|
+
// afterEachTest
|
|
28
|
+
let afterEachTestFunc;
|
|
29
|
+
function afterEachTest(func) {
|
|
30
|
+
if (typeof func !== 'function') {
|
|
31
|
+
throw new Error('afterDescribe() error, argument passed to afterDescribe() must be a function,'
|
|
32
|
+
+ ` received ${typeof func}`);
|
|
33
|
+
}
|
|
34
|
+
afterEachTestFunc = func;
|
|
35
|
+
}
|
|
36
|
+
// it
|
|
37
|
+
function it(should, test) {
|
|
38
|
+
const thisItCounter = itCounter++;
|
|
39
|
+
its.push({
|
|
40
|
+
counter: thisItCounter,
|
|
41
|
+
should,
|
|
42
|
+
test
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const beforeDescribeExports = {};
|
|
46
|
+
await configBeforeEachDescribe(config, beforeDescribeExports);
|
|
47
|
+
const describeParcel = { it, test: it, afterDescribe, beforeEachTest, afterEachTest };
|
|
48
|
+
addExports(describeParcel, beforeDescribeExports);
|
|
49
|
+
let error;
|
|
50
|
+
try {
|
|
51
|
+
await describe.tests(describeParcel);
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
error = e;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
its,
|
|
58
|
+
beforeDescribeExports,
|
|
59
|
+
afterDescribeFunc,
|
|
60
|
+
beforeEachTestFunc,
|
|
61
|
+
afterEachTestFunc,
|
|
62
|
+
error
|
|
63
|
+
};
|
|
64
|
+
});
|
|
76
65
|
}
|
|
77
66
|
async function configBeforeEachDescribe(config, exports) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
67
|
+
if (config.beforeEachDescribe !== undefined) {
|
|
68
|
+
const theExports = await runTasks(config.beforeEachDescribe, undefined);
|
|
69
|
+
if (theExports)
|
|
70
|
+
addExports(exports, theExports);
|
|
71
|
+
}
|
|
82
72
|
}
|
|
83
|
-
|
|
84
|
-
if (config.afterEachDescribe) {
|
|
85
|
-
await runTasks(config.afterEachDescribe, exports);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
73
|
+
//# sourceMappingURL=parseDescribe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseDescribe.js","sourceRoot":"","sources":["../../../src/cli/lib/parseDescribe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAI5C,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,QAAkB;IAC5D,OAAO,gBAAgB,CAAC,2BAA2B,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,IAAI,EAAE;QAC5E,IAAI,SAAS,GAAG,CAAC,CAAA;QACjB,MAAM,GAAG,GAAS,EAAE,CAAA;QAEpB,gCAAgC;QAEhC,gBAAgB;QAChB,IAAI,iBAA2D,CAAA;QAC/D,SAAS,aAAa,CAAC,IAAgC;YACnD,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;gBAC7B,MAAM,IAAI,KAAK,CAAC,+EAA+E;sBACzF,aAAa,OAAO,IAAI,EAAE,CAAC,CAAA;YACrC,CAAC;YACD,iBAAiB,GAAG,IAAI,CAAA;QAC5B,CAAC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