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
package/dist/cli/lib/runTests.js
CHANGED
|
@@ -1,150 +1,132 @@
|
|
|
1
|
-
import { createTimeProfiler } from '
|
|
1
|
+
import { createTimeProfiler } from '../../packages/timeProfiler.js';
|
|
2
2
|
import { showTimeProfiling } from '../../config.js';
|
|
3
|
-
import chalk from 'chalk
|
|
4
|
-
import { out as mainOut
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
//import { testsState } from '../../testsState.js'
|
|
8
|
-
|
|
9
|
-
import objects from 'sxy-lib/objects.js';
|
|
3
|
+
import chalk from '../../packages/chalk.js';
|
|
4
|
+
import { out as mainOut } from '../../output.js';
|
|
5
|
+
import figures from '../../packages/figures.js';
|
|
6
|
+
import { count } from 'sxy-lib/objects.js';
|
|
10
7
|
import { remove as arrayRemove } from 'sxy-lib/arrays.js';
|
|
11
8
|
import { allObj as promiseAllObj } from 'sxy-lib/promises.js';
|
|
12
9
|
import { loadTestFile } from './loadTestFile.js';
|
|
13
10
|
import { runTest } from './runTest.js';
|
|
14
11
|
import { showTestLoadingError } from './showTestLoadingError.js';
|
|
15
12
|
import { showTestResult } from './showTestResult.js';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const {
|
|
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
|
-
await arrayRemove(failingTests, testResult.file);
|
|
50
|
-
}
|
|
51
|
-
} else {
|
|
52
|
-
if (!(await failingTests.includes(testResult.file))) {
|
|
53
|
-
await failingTests.push(testResult.file);
|
|
54
|
-
}
|
|
13
|
+
const { timeProfileAsync } = createTimeProfiler(showTimeProfiling);
|
|
14
|
+
export async function runTests(config, testFiles, failingTests, customOut) {
|
|
15
|
+
const testRunPromises = {};
|
|
16
|
+
const erroringTests = {};
|
|
17
|
+
const testRunOutPromises = {};
|
|
18
|
+
await timeProfileAsync('run tests', async () => {
|
|
19
|
+
if (testFiles.length > 0) {
|
|
20
|
+
for (const testFile of testFiles) {
|
|
21
|
+
const test = await loadTestFile(config, testFile);
|
|
22
|
+
if (test.error !== undefined && test.error !== false) {
|
|
23
|
+
erroringTests[testFile] = test;
|
|
24
|
+
await showTestLoadingError(config, test);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const testRunPromise = runTest(config, test);
|
|
28
|
+
testRunPromises[testFile] = testRunPromise;
|
|
29
|
+
testRunOutPromises[testFile] = testRunPromise.then(async (testResult) => {
|
|
30
|
+
if (testResult.success === true || testResult.success === null) {
|
|
31
|
+
if (failingTests.includes(testResult.file)) {
|
|
32
|
+
arrayRemove(failingTests, testResult.file);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
if (!failingTests.includes(testResult.file)) {
|
|
37
|
+
failingTests.push(testResult.file);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
await showTestResult(config, testResult, customOut);
|
|
41
|
+
});
|
|
42
|
+
// wait for the test to complete before proceeding if we are in 'sequential' mode
|
|
43
|
+
if (config.execution.files === 'sequential')
|
|
44
|
+
await testRunOutPromises[testFile];
|
|
45
|
+
}
|
|
55
46
|
}
|
|
56
|
-
await showTestResult(config, testResult, customOut);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// wait for the test to complete before proceeding if we are in 'sequential' mode
|
|
60
|
-
if (config.execution.files === 'sequential') await testRunOutPromises[testFile];
|
|
61
47
|
}
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
// true/false gets returned to the caller of runTests()
|
|
148
|
-
return allPassed;
|
|
149
|
-
});
|
|
150
|
-
}
|
|
48
|
+
});
|
|
49
|
+
let runTestResults = {};
|
|
50
|
+
await timeProfileAsync('wait for tests to finish', async () => {
|
|
51
|
+
runTestResults = await promiseAllObj(testRunPromises);
|
|
52
|
+
// wait for the output to complete
|
|
53
|
+
await promiseAllObj(testRunOutPromises);
|
|
54
|
+
});
|
|
55
|
+
return timeProfileAsync('show initial test run results', () => {
|
|
56
|
+
const out = customOut ?? mainOut;
|
|
57
|
+
const testsResultsSummary = {
|
|
58
|
+
total: 0,
|
|
59
|
+
passes: 0,
|
|
60
|
+
invalid: 0,
|
|
61
|
+
describesTotal: 0,
|
|
62
|
+
describesPasses: 0,
|
|
63
|
+
describesInvalid: 0,
|
|
64
|
+
itsTotal: 0,
|
|
65
|
+
itsPasses: 0
|
|
66
|
+
// itsInvalid: 0 // we don't check whether tests run any asserts (we don't control the assertion lib)
|
|
67
|
+
};
|
|
68
|
+
for (const testFile in runTestResults) {
|
|
69
|
+
const runTestResult = runTestResults[testFile];
|
|
70
|
+
if (!runTestResult)
|
|
71
|
+
continue;
|
|
72
|
+
testsResultsSummary.total += +(runTestResult.success !== null);
|
|
73
|
+
testsResultsSummary.passes += +(runTestResult.success ?? false);
|
|
74
|
+
testsResultsSummary.invalid += +(runTestResult.success === null);
|
|
75
|
+
testsResultsSummary.describesTotal += runTestResult.describeResultsSummary.total;
|
|
76
|
+
testsResultsSummary.describesPasses += runTestResult.describeResultsSummary.passes;
|
|
77
|
+
testsResultsSummary.describesInvalid += runTestResult.describeResultsSummary.invalid;
|
|
78
|
+
testsResultsSummary.itsTotal += runTestResult.describeResultsSummary.itsTotal;
|
|
79
|
+
testsResultsSummary.itsPasses += runTestResult.describeResultsSummary.itsPasses;
|
|
80
|
+
}
|
|
81
|
+
testsResultsSummary.total += count(erroringTests);
|
|
82
|
+
out('\n');
|
|
83
|
+
const allPassed = (testsResultsSummary.passes === testsResultsSummary.total
|
|
84
|
+
&& testsResultsSummary.describesPasses === testsResultsSummary.describesTotal
|
|
85
|
+
&& testsResultsSummary.itsPasses === testsResultsSummary.itsTotal);
|
|
86
|
+
if (allPassed) {
|
|
87
|
+
out(chalk.mediumgreen(`${figures.tick}`));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
out(chalk.mediumred(`${figures.cross}`));
|
|
91
|
+
}
|
|
92
|
+
// number of tests successful
|
|
93
|
+
const testsText = `Tests: ${testsResultsSummary.itsPasses}/${testsResultsSummary.itsTotal}`;
|
|
94
|
+
if (testsResultsSummary.itsPasses === testsResultsSummary.itsTotal) {
|
|
95
|
+
out(chalk.mediumgreen(`${testsText}`));
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
out(chalk.mediumred(`${testsText}`));
|
|
99
|
+
}
|
|
100
|
+
// number of items successful
|
|
101
|
+
const describesText = `Items: ${testsResultsSummary.describesPasses}/${testsResultsSummary.describesTotal}`;
|
|
102
|
+
const invalidDescribesText = (testsResultsSummary.describesInvalid >= 1)
|
|
103
|
+
? (testsResultsSummary.describesInvalid === 1)
|
|
104
|
+
? chalk.grey('(+1 describe without tests)')
|
|
105
|
+
: chalk.grey(`(+${testsResultsSummary.describesInvalid} describes without tests)`)
|
|
106
|
+
: '';
|
|
107
|
+
if (testsResultsSummary.describesPasses === testsResultsSummary.describesTotal) {
|
|
108
|
+
out(chalk.mediumgreen(`${describesText}`) + ' ' + invalidDescribesText);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
out(chalk.mediumred(`${describesText}`) + ' ' + invalidDescribesText);
|
|
112
|
+
}
|
|
113
|
+
// number of test files successful
|
|
114
|
+
const testFilesText = `Test Files: ${testsResultsSummary.passes}/${testsResultsSummary.total}`;
|
|
115
|
+
const invalidTestFilesText = (testsResultsSummary.invalid >= 1)
|
|
116
|
+
? (testsResultsSummary.invalid === 1)
|
|
117
|
+
? chalk.grey('(+1 file without tests)')
|
|
118
|
+
: chalk.grey(`(+${testsResultsSummary.invalid} files without tests)`)
|
|
119
|
+
: '';
|
|
120
|
+
if (testsResultsSummary.passes === testsResultsSummary.total) {
|
|
121
|
+
out(chalk.mediumgreen(`${testFilesText}`) + ' ' + invalidTestFilesText);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
out(chalk.mediumred(`${testFilesText}`) + ' ' + invalidTestFilesText);
|
|
125
|
+
}
|
|
126
|
+
out(chalk.orange `To do: account for tests with loading errors`);
|
|
127
|
+
// full success?
|
|
128
|
+
// true/false gets returned to the caller of runTests()
|
|
129
|
+
return allPassed;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=runTests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runTests.js","sourceRoot":"","sources":["../../../src/cli/lib/runTests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,MAAM,yBAAyB,CAAA;AAC3C,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,OAAO,MAAM,2BAA2B,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA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AC,CAAC,mBAAmB,CAAC,OAAO,KAAK,CAAC,CAAC;gBACjC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC;gBACvC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,mBAAmB,CAAC,OAAO,uBAAuB,CAAC;YACzE,CAAC,CAAC,EAAE,CAAA;QACR,IAAI,mBAAmB,CAAC,MAAM,KAAK,mBAAmB,CAAC,KAAK,EAAE,CAAC;YAC3D,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,GAAG,GAAG,oBAAoB,CAAC,CAAA;QAC3E,CAAC;aAAM,CAAC;YACJ,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,GAAG,GAAG,oBAAoB,CAAC,CAAA;QACzE,CAAC;QAED,GAAG,CAAC,KAAK,CAAC,MAAM,CAAA,8CAA8C,CAAC,CAAA;QAE/D,gBAAgB;QAChB,uDAAuD;QACvD,OAAO,SAAS,CAAA;IACpB,CAAC,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runTests.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/runTests.unitTest.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IAEX,IAAI,iBAAiB,EAAE,OAAO,CAAA;IAE9B,IAAI,iBAAiB,EAAE,OAAO,CAAA;CACjC"}
|
|
@@ -1,64 +1,51 @@
|
|
|
1
1
|
import { applyConfigDefaults } from './applyConfigDefaults.js';
|
|
2
2
|
import { runTests } from './runTests.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
//console.log(outBuffer)
|
|
20
|
-
|
|
21
|
-
await outBuffer.should.include('1 should equal 1');
|
|
22
|
-
await outBuffer.should.include('Tests: 1/1');
|
|
23
|
-
await outBuffer.should.include('Items: 1/1');
|
|
24
|
-
await outBuffer.should.include('Test Files: 1/1');
|
|
25
|
-
});
|
|
26
|
-
await mochaIt('should sensibly handle tallies when test files with no describes are included', async function () {
|
|
27
|
-
// create a custom out function to capture the output
|
|
28
|
-
let outBuffer = '';
|
|
29
|
-
const customOut = (...texts) => {
|
|
30
|
-
outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
|
|
31
|
-
};
|
|
32
|
-
const config = await applyConfigDefaults({});
|
|
33
|
-
const testFiles = ['unitTesting/sampleTests/1.test.js', 'unitTesting/sampleTests/blank.test.js', 'unitTesting/sampleTests/describesWithoutTests.test.js'];
|
|
34
|
-
const results = await runTests(config, testFiles, [], customOut);
|
|
35
|
-
|
|
36
|
-
//console.log('results', results)
|
|
37
|
-
|
|
38
|
-
//console.log('outBuffer', outBuffer)
|
|
39
|
-
|
|
40
|
-
await outBuffer.should.include('1 should equal 1');
|
|
41
|
-
await outBuffer.should.include('Tests: 1/1');
|
|
42
|
-
await outBuffer.should.include('Items: 1/1');
|
|
43
|
-
await outBuffer.should.include('(+2 describes without tests)');
|
|
44
|
-
await outBuffer.should.include('Test Files: 1/1');
|
|
45
|
-
await outBuffer.should.include('(+2 files without tests)');
|
|
46
|
-
});
|
|
47
|
-
await mochaIt('runs test files sequentially in test mode', async function () {
|
|
48
|
-
// create a custom out function to capture the output
|
|
49
|
-
// let outBuffer = ''
|
|
50
|
-
// const customOut = sync((...texts) => {
|
|
51
|
-
// outBuffer += texts.join(' ') + '\n' // join and save to the buffer
|
|
52
|
-
// })
|
|
53
|
-
|
|
54
|
-
const config = await applyConfigDefaults({
|
|
55
|
-
execution: {
|
|
56
|
-
files: 'sequential'
|
|
57
|
-
}
|
|
3
|
+
mochaDescribe('runTests() function', function () {
|
|
4
|
+
mochaIt('should run provided test files and produce an output of results', async function () {
|
|
5
|
+
// create a custom out function to capture the output
|
|
6
|
+
let outBuffer = '';
|
|
7
|
+
const customOut = (...texts) => {
|
|
8
|
+
outBuffer += texts.join(' ') + '\n';
|
|
9
|
+
};
|
|
10
|
+
const config = applyConfigDefaults({});
|
|
11
|
+
const testFiles = [
|
|
12
|
+
'unitTesting/sampleTests/1.test.js'
|
|
13
|
+
];
|
|
14
|
+
await runTests(config, testFiles, [], customOut);
|
|
15
|
+
outBuffer.should.include('1 should equal 1');
|
|
16
|
+
outBuffer.should.include('Tests: 1/1');
|
|
17
|
+
outBuffer.should.include('Items: 1/1');
|
|
18
|
+
outBuffer.should.include('Test Files: 1/1');
|
|
58
19
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
20
|
+
mochaIt('should sensibly handle tallies when test files with no describes are included', async function () {
|
|
21
|
+
// create a custom out function to capture the output
|
|
22
|
+
let outBuffer = '';
|
|
23
|
+
const customOut = (...texts) => {
|
|
24
|
+
outBuffer += texts.join(' ') + '\n';
|
|
25
|
+
};
|
|
26
|
+
const config = applyConfigDefaults({});
|
|
27
|
+
const testFiles = [
|
|
28
|
+
'unitTesting/sampleTests/1.test.js',
|
|
29
|
+
'unitTesting/sampleTests/blank.test.js',
|
|
30
|
+
'unitTesting/sampleTests/describesWithoutTests.test.js'
|
|
31
|
+
];
|
|
32
|
+
await runTests(config, testFiles, [], customOut);
|
|
33
|
+
outBuffer.should.include('1 should equal 1');
|
|
34
|
+
outBuffer.should.include('Tests: 1/1');
|
|
35
|
+
outBuffer.should.include('Items: 1/1');
|
|
36
|
+
outBuffer.should.include('(+2 describes without tests)');
|
|
37
|
+
outBuffer.should.include('Test Files: 1/1');
|
|
38
|
+
outBuffer.should.include('(+2 files without tests)');
|
|
39
|
+
});
|
|
40
|
+
mochaIt('runs test files sequentially in test mode', async function () {
|
|
41
|
+
const config = applyConfigDefaults({ execution: { files: 'sequential', describes: 'sequential', tests: 'sequential' } });
|
|
42
|
+
const testFiles = [
|
|
43
|
+
'unitTesting/runTests/sequential/1.test.js',
|
|
44
|
+
'unitTesting/runTests/sequential/2.test.js'
|
|
45
|
+
];
|
|
46
|
+
await runTests(config, testFiles, []);
|
|
47
|
+
global.sequential1Status.should.be.true;
|
|
48
|
+
global.sequential2Status.should.be.true;
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=runTests.unitTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runTests.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/runTests.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AASxC,aAAa,CAAC,qBAAqB,EAAE;IACjC,OAAO,CAAC,iEAAiE,EAAE,KAAK;QAC5E,qDAAqD;QACrD,IAAI,SAAS,GAAG,EAAE,CAAA;QAClB,MAAM,SAAS,GAAG,CAAC,GAAG,KAAgB,EAAQ,EAAE;YAC5C,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;QACvC,CAAC,CAAA;QAED,MAAM,MAAM,GAAG,mBAAmB,CAAC,EAAE,CAAC,CAAA;QAEtC,MAAM,SAAS,GAAG;YACd,mCAAmC;SACtC,CAAA;QAED,MAAM,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;QAEhD,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;QAC5C,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;QACtC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;QACtC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA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,MAAM,CAAC,EAAE,CAAC,IAAI,CAAA;QACvC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAA;IAC3C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showTestLoadingError.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/showTestLoadingError.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAI7D,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB3G"}
|
|
@@ -1,33 +1,22 @@
|
|
|
1
|
-
import { createTimeProfiler } from '
|
|
2
|
-
import {
|
|
3
|
-
import chalk from 'chalk
|
|
4
|
-
import { out as mainOut
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (test.logs && test.logs.length > 0) {
|
|
24
|
-
out();
|
|
25
|
-
out( /*indent + */chalk.grey`console.logs:`);
|
|
26
|
-
test.logs.forEach(async log => {
|
|
27
|
-
/*log[0] = indent + log[0]*/
|
|
28
|
-
await out(...log);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
out();
|
|
32
|
-
});
|
|
33
|
-
}
|
|
1
|
+
import { createTimeProfiler } from '../../packages/timeProfiler.js';
|
|
2
|
+
import { showTimeProfiling } from '../../config.js';
|
|
3
|
+
import chalk from '../../packages/chalk.js';
|
|
4
|
+
import { out as mainOut } from '../../output.js';
|
|
5
|
+
const { timeProfileAsync } = createTimeProfiler(showTimeProfiling);
|
|
6
|
+
export async function showTestLoadingError(config, test, customOut) {
|
|
7
|
+
const out = customOut ?? mainOut;
|
|
8
|
+
await timeProfileAsync('show test loading error', () => {
|
|
9
|
+
out();
|
|
10
|
+
out(chalk.grey `File ${test.file}`);
|
|
11
|
+
out(chalk.mediumred `Loading error:\n${test.error}`);
|
|
12
|
+
if (test.logs && test.logs.length > 0) {
|
|
13
|
+
out();
|
|
14
|
+
out(chalk.grey `console.logs:`);
|
|
15
|
+
test.logs.forEach(log => {
|
|
16
|
+
out(...log);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
out();
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=showTestLoadingError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showTestLoadingError.js","sourceRoot":"","sources":["../../../src/cli/lib/showTestLoadingError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,MAAM,yBAAyB,CAAA;AAC3C,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAIhD,MAAM,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAElE,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAAc,EAAE,IAAc,EAAE,SAAiB;IACxF,MAAM,GAAG,GAAG,SAAS,IAAI,OAAO,CAAA;IAEhC,MAAM,gBAAgB,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACnD,GAAG,EAAE,CAAA;QACL,GAAG,CAAC,KAAK,CAAC,IAAI,CAAA,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;QAClC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAA,mBAAmB,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;QAEnD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpC,GAAG,EAAE,CAAA;YACL,GAAG,CAAC,KAAK,CAAC,IAAI,CAAA,eAAe,CAAC,CAAA;YAC9B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACpB,GAAG,CAAC,GAAG,GAAG,CAAC,CAAA;YACf,CAAC,CAAC,CAAA;QACN,CAAC;QAED,GAAG,EAAE,CAAA;IACT,CAAC,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showTestLoadingError.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/showTestLoadingError.unitTest.ts"],"names":[],"mappings":""}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { defaultConfig } from './defaultConfig.js';
|
|
2
2
|
import { showTestLoadingError } from './showTestLoadingError.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
|
|
20
|
-
//console.log('outBuffer:', outBuffer)
|
|
21
|
-
};
|
|
22
|
-
await showTestLoadingError(config, test, customOut);
|
|
23
|
-
await console.log(outBuffer);
|
|
24
|
-
await outBuffer.should.include(test.error);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
3
|
+
mochaDescribe('showTestLoadingError() function', function () {
|
|
4
|
+
mochaIt('should show the loading error of a test after loading failure', async function () {
|
|
5
|
+
const test = {
|
|
6
|
+
file: 'foo.js',
|
|
7
|
+
error: 'There was an error'
|
|
8
|
+
};
|
|
9
|
+
// create a custom out function to capture the output
|
|
10
|
+
let outBuffer = '';
|
|
11
|
+
const customOut = (...texts) => {
|
|
12
|
+
outBuffer += texts.join(' ') + '\n';
|
|
13
|
+
};
|
|
14
|
+
await showTestLoadingError(defaultConfig, test, customOut);
|
|
15
|
+
outBuffer.should.include(test.error);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=showTestLoadingError.unitTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showTestLoadingError.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/showTestLoadingError.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE,aAAa,CAAC,iCAAiC,EAAE;IAC7C,OAAO,CAAC,+DAA+D,EAAE,KAAK;QAC1E,MAAM,IAAI,GAAG;YACT,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,oBAAoB;SAC9B,CAAA;QAED,qDAAqD;QACrD,IAAI,SAAS,GAAG,EAAE,CAAA;QAClB,MAAM,SAAS,GAAG,CAAC,GAAG,KAAgB,EAAQ,EAAE;YAC5C,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;QACvC,CAAC,CAAA;QAED,MAAM,oBAAoB,CAAC,aAAa,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;QAE1D,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showTestResult.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/showTestResult.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAI/D,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAiG7G"}
|