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.
Files changed (287) hide show
  1. package/dist/cli/index.js +24 -22
  2. package/dist/cli/init.js +41 -91
  3. package/dist/cli/init.js.map +1 -1
  4. package/dist/cli/lib/addBasePath.d.ts.map +1 -1
  5. package/dist/cli/lib/addBasePath.js +12 -14
  6. package/dist/cli/lib/addBasePath.js.map +1 -1
  7. package/dist/cli/lib/addBasePath.unitTest.d.ts +2 -0
  8. package/dist/cli/lib/addBasePath.unitTest.d.ts.map +1 -0
  9. package/dist/cli/lib/addBasePath.unitTest.js +51 -29
  10. package/dist/cli/lib/addBasePath.unitTest.js.map +1 -0
  11. package/dist/cli/lib/addExports.js +13 -11
  12. package/dist/cli/lib/addExports.unitTest.d.ts +2 -0
  13. package/dist/cli/lib/addExports.unitTest.d.ts.map +1 -0
  14. package/dist/cli/lib/addExports.unitTest.js +15 -30
  15. package/dist/cli/lib/addExports.unitTest.js.map +1 -0
  16. package/dist/cli/lib/applyConfigDefaults.js +6 -42
  17. package/dist/cli/lib/applyConfigDefaults.js.map +1 -1
  18. package/dist/cli/lib/applyConfigDefaults.unitTest.d.ts +2 -0
  19. package/dist/cli/lib/applyConfigDefaults.unitTest.d.ts.map +1 -0
  20. package/dist/cli/lib/applyConfigDefaults.unitTest.js +19 -27
  21. package/dist/cli/lib/applyConfigDefaults.unitTest.js.map +1 -0
  22. package/dist/cli/lib/buildDependencyTree.js +23 -34
  23. package/dist/cli/lib/buildDependencyTree.js.map +1 -1
  24. package/dist/cli/lib/buildDependencyTree.unitTest.d.ts +2 -0
  25. package/dist/cli/lib/buildDependencyTree.unitTest.d.ts.map +1 -0
  26. package/dist/cli/lib/buildDependencyTree.unitTest.js +13 -11
  27. package/dist/cli/lib/buildDependencyTree.unitTest.js.map +1 -0
  28. package/dist/cli/lib/buildDependencyTrees.js +15 -34
  29. package/dist/cli/lib/buildDependencyTrees.js.map +1 -1
  30. package/dist/cli/lib/buildDependencyTrees.unitTest.d.ts +2 -0
  31. package/dist/cli/lib/buildDependencyTrees.unitTest.d.ts.map +1 -0
  32. package/dist/cli/lib/buildDependencyTrees.unitTest.js +18 -14
  33. package/dist/cli/lib/buildDependencyTrees.unitTest.js.map +1 -0
  34. package/dist/cli/lib/defaultConfig.js +23 -21
  35. package/dist/cli/lib/defaultConfig.unitTest.d.ts +2 -0
  36. package/dist/cli/lib/defaultConfig.unitTest.d.ts.map +1 -0
  37. package/dist/cli/lib/defaultConfig.unitTest.js +7 -0
  38. package/dist/cli/lib/defaultConfig.unitTest.js.map +1 -0
  39. package/dist/cli/lib/doUserSetup.d.ts +1 -1
  40. package/dist/cli/lib/doUserSetup.d.ts.map +1 -1
  41. package/dist/cli/lib/doUserSetup.js +20 -23
  42. package/dist/cli/lib/doUserSetup.js.map +1 -1
  43. package/dist/cli/lib/doUserSetup.unitTest.d.ts +7 -0
  44. package/dist/cli/lib/doUserSetup.unitTest.d.ts.map +1 -0
  45. package/dist/cli/lib/doUserSetup.unitTest.js +41 -36
  46. package/dist/cli/lib/doUserSetup.unitTest.js.map +1 -0
  47. package/dist/cli/lib/doUserTeardown.d.ts +1 -1
  48. package/dist/cli/lib/doUserTeardown.d.ts.map +1 -1
  49. package/dist/cli/lib/doUserTeardown.js +21 -23
  50. package/dist/cli/lib/doUserTeardown.js.map +1 -1
  51. package/dist/cli/lib/doUserTeardown.unitTest.d.ts +7 -0
  52. package/dist/cli/lib/doUserTeardown.unitTest.d.ts.map +1 -0
  53. package/dist/cli/lib/doUserTeardown.unitTest.js +41 -36
  54. package/dist/cli/lib/doUserTeardown.unitTest.js.map +1 -0
  55. package/dist/cli/lib/findTestFiles.d.ts.map +1 -1
  56. package/dist/cli/lib/findTestFiles.js +16 -24
  57. package/dist/cli/lib/findTestFiles.js.map +1 -1
  58. package/dist/cli/lib/findTestFiles.unitTest.d.ts +2 -0
  59. package/dist/cli/lib/findTestFiles.unitTest.d.ts.map +1 -0
  60. package/dist/cli/lib/findTestFiles.unitTest.js +19 -19
  61. package/dist/cli/lib/findTestFiles.unitTest.js.map +1 -0
  62. package/dist/cli/lib/getAllowedFlags.js +10 -8
  63. package/dist/cli/lib/getAllowedFlags.unitTest.d.ts +2 -0
  64. package/dist/cli/lib/getAllowedFlags.unitTest.d.ts.map +1 -0
  65. package/dist/cli/lib/getAllowedFlags.unitTest.js +22 -21
  66. package/dist/cli/lib/getAllowedFlags.unitTest.js.map +1 -0
  67. package/dist/cli/lib/globArgCombine.js +8 -1
  68. package/dist/cli/lib/globArgCombine.unitTest.d.ts +2 -0
  69. package/dist/cli/lib/globArgCombine.unitTest.d.ts.map +1 -0
  70. package/dist/cli/lib/globArgCombine.unitTest.js +19 -18
  71. package/dist/cli/lib/globArgCombine.unitTest.js.map +1 -0
  72. package/dist/cli/lib/injectProperties.d.ts.map +1 -1
  73. package/dist/cli/lib/injectProperties.js +10 -10
  74. package/dist/cli/lib/injectProperties.js.map +1 -1
  75. package/dist/cli/lib/injectProperties.unitTest.d.ts +2 -0
  76. package/dist/cli/lib/injectProperties.unitTest.d.ts.map +1 -0
  77. package/dist/cli/lib/injectProperties.unitTest.js +19 -81
  78. package/dist/cli/lib/injectProperties.unitTest.js.map +1 -0
  79. package/dist/cli/lib/loadConfig.js +14 -18
  80. package/dist/cli/lib/loadConfig.js.map +1 -1
  81. package/dist/cli/lib/loadConfig.unitTest.d.ts +2 -0
  82. package/dist/cli/lib/loadConfig.unitTest.d.ts.map +1 -0
  83. package/dist/cli/lib/loadConfig.unitTest.js +15 -15
  84. package/dist/cli/lib/loadConfig.unitTest.js.map +1 -0
  85. package/dist/cli/lib/loadTestFile.js +48 -78
  86. package/dist/cli/lib/loadTestFile.js.map +1 -1
  87. package/dist/cli/lib/loadTestFile.unitTest.d.ts +2 -0
  88. package/dist/cli/lib/loadTestFile.unitTest.d.ts.map +1 -0
  89. package/dist/cli/lib/loadTestFile.unitTest.js +12 -49
  90. package/dist/cli/lib/loadTestFile.unitTest.js.map +1 -0
  91. package/dist/cli/lib/parseCommandLineArguments.js +48 -42
  92. package/dist/cli/lib/parseCommandLineArguments.unitTest.d.ts +2 -0
  93. package/dist/cli/lib/parseCommandLineArguments.unitTest.d.ts.map +1 -0
  94. package/dist/cli/lib/parseCommandLineArguments.unitTest.js +22 -24
  95. package/dist/cli/lib/parseCommandLineArguments.unitTest.js.map +1 -0
  96. package/dist/cli/lib/parseDescribe.d.ts.map +1 -1
  97. package/dist/cli/lib/parseDescribe.js +67 -81
  98. package/dist/cli/lib/parseDescribe.js.map +1 -1
  99. package/dist/cli/lib/parseDescribe.unitTest.d.ts +2 -0
  100. package/dist/cli/lib/parseDescribe.unitTest.d.ts.map +1 -0
  101. package/dist/cli/lib/parseDescribe.unitTest.js +20 -18
  102. package/dist/cli/lib/parseDescribe.unitTest.js.map +1 -0
  103. package/dist/cli/lib/reservedExportKeys.d.ts +2 -0
  104. package/dist/cli/lib/reservedExportKeys.d.ts.map +1 -0
  105. package/dist/cli/lib/reservedExportKeys.js +12 -1
  106. package/dist/cli/lib/reservedExportKeys.js.map +1 -0
  107. package/dist/cli/lib/reservedExportKeys.unitTest.d.ts +2 -0
  108. package/dist/cli/lib/reservedExportKeys.unitTest.d.ts.map +1 -0
  109. package/dist/cli/lib/reservedExportKeys.unitTest.js +6 -8
  110. package/dist/cli/lib/reservedExportKeys.unitTest.js.map +1 -0
  111. package/dist/cli/lib/runDescribe.d.ts.map +1 -1
  112. package/dist/cli/lib/runDescribe.js +39 -39
  113. package/dist/cli/lib/runDescribe.js.map +1 -1
  114. package/dist/cli/lib/runDescribe.unitTest.d.ts +2 -0
  115. package/dist/cli/lib/runDescribe.unitTest.d.ts.map +1 -0
  116. package/dist/cli/lib/runDescribe.unitTest.js +22 -402
  117. package/dist/cli/lib/runDescribe.unitTest.js.map +1 -0
  118. package/dist/cli/lib/runDescribeRun.js +34 -49
  119. package/dist/cli/lib/runDescribeRun.js.map +1 -1
  120. package/dist/cli/lib/runDescribeRun.unitTest.d.ts +2 -0
  121. package/dist/cli/lib/runDescribeRun.unitTest.d.ts.map +1 -0
  122. package/dist/cli/lib/runDescribeRun.unitTest.js +44 -410
  123. package/dist/cli/lib/runDescribeRun.unitTest.js.map +1 -0
  124. package/dist/cli/lib/runIt.d.ts +1 -1
  125. package/dist/cli/lib/runIt.d.ts.map +1 -1
  126. package/dist/cli/lib/runIt.js +59 -69
  127. package/dist/cli/lib/runIt.js.map +1 -1
  128. package/dist/cli/lib/runIt.unitTest.d.ts +2 -0
  129. package/dist/cli/lib/runIt.unitTest.d.ts.map +1 -0
  130. package/dist/cli/lib/runIt.unitTest.js +73 -410
  131. package/dist/cli/lib/runIt.unitTest.js.map +1 -0
  132. package/dist/cli/lib/runTasks.d.ts +1 -1
  133. package/dist/cli/lib/runTasks.d.ts.map +1 -1
  134. package/dist/cli/lib/runTasks.js +28 -31
  135. package/dist/cli/lib/runTasks.js.map +1 -1
  136. package/dist/cli/lib/runTasks.unitTest.d.ts +5 -0
  137. package/dist/cli/lib/runTasks.unitTest.d.ts.map +1 -0
  138. package/dist/cli/lib/runTasks.unitTest.js +35 -31
  139. package/dist/cli/lib/runTasks.unitTest.js.map +1 -0
  140. package/dist/cli/lib/runTest.js +54 -66
  141. package/dist/cli/lib/runTest.js.map +1 -1
  142. package/dist/cli/lib/runTest.unitTest.d.ts +20 -0
  143. package/dist/cli/lib/runTest.unitTest.d.ts.map +1 -0
  144. package/dist/cli/lib/runTest.unitTest.js +274 -289
  145. package/dist/cli/lib/runTest.unitTest.js.map +1 -0
  146. package/dist/cli/lib/runTests.d.ts.map +1 -1
  147. package/dist/cli/lib/runTests.js +123 -141
  148. package/dist/cli/lib/runTests.js.map +1 -1
  149. package/dist/cli/lib/runTests.unitTest.d.ts +6 -0
  150. package/dist/cli/lib/runTests.unitTest.d.ts.map +1 -0
  151. package/dist/cli/lib/runTests.unitTest.js +48 -61
  152. package/dist/cli/lib/runTests.unitTest.js.map +1 -0
  153. package/dist/cli/lib/showTestLoadingError.js +22 -33
  154. package/dist/cli/lib/showTestLoadingError.js.map +1 -1
  155. package/dist/cli/lib/showTestLoadingError.unitTest.d.ts +2 -0
  156. package/dist/cli/lib/showTestLoadingError.unitTest.d.ts.map +1 -0
  157. package/dist/cli/lib/showTestLoadingError.unitTest.js +16 -24
  158. package/dist/cli/lib/showTestLoadingError.unitTest.js.map +1 -0
  159. package/dist/cli/lib/showTestResult.js +88 -88
  160. package/dist/cli/lib/showTestResult.js.map +1 -1
  161. package/dist/cli/lib/showTestResult.unitTest.d.ts +2 -0
  162. package/dist/cli/lib/showTestResult.unitTest.d.ts.map +1 -0
  163. package/dist/cli/lib/showTestResult.unitTest.js +176 -184
  164. package/dist/cli/lib/showTestResult.unitTest.js.map +1 -0
  165. package/dist/cli/lib/testHelpers/makeCustomOut.d.ts +7 -0
  166. package/dist/cli/lib/testHelpers/makeCustomOut.d.ts.map +1 -0
  167. package/dist/cli/lib/testHelpers/makeCustomOut.js +10 -0
  168. package/dist/cli/lib/testHelpers/makeCustomOut.js.map +1 -0
  169. package/dist/cli/lib/timeProfier.js +4 -6
  170. package/dist/cli/lib/timeProfier.js.map +1 -1
  171. package/dist/cli/lib/validateConfig.js +21 -24
  172. package/dist/cli/lib/validateConfig.unitTest.d.ts +2 -0
  173. package/dist/cli/lib/validateConfig.unitTest.d.ts.map +1 -0
  174. package/dist/cli/lib/validateConfig.unitTest.js +17 -18
  175. package/dist/cli/lib/validateConfig.unitTest.js.map +1 -0
  176. package/dist/cli/lib/{watchFiles.js → watchFiles.d.ts} +2 -1
  177. package/dist/cli/lib/watchFiles.d.ts.map +1 -0
  178. package/dist/cli/lib/watchFiles.js.map +1 -0
  179. package/dist/cli/lib/watchFiles.unitTest.d.ts +2 -0
  180. package/dist/cli/lib/watchFiles.unitTest.d.ts.map +1 -0
  181. package/dist/cli/lib/watchFiles.unitTest.js.map +1 -0
  182. package/dist/cli/lib/watchFilesAndRunTests.js +2 -3
  183. package/dist/cli/lib/watchFilesAndRunTests.unitTest.d.ts +2 -0
  184. package/dist/cli/lib/watchFilesAndRunTests.unitTest.d.ts.map +1 -0
  185. package/dist/cli/lib/watchFilesAndRunTests.unitTest.js +86 -96
  186. package/dist/cli/lib/watchFilesAndRunTests.unitTest.js.map +1 -0
  187. package/dist/cli/lib/watchFilesAndRunTestsChokidar.d.ts.map +1 -1
  188. package/dist/cli/lib/watchFilesAndRunTestsChokidar.js +99 -127
  189. package/dist/cli/lib/watchFilesAndRunTestsChokidar.js.map +1 -1
  190. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.d.ts +2 -0
  191. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.d.ts.map +1 -0
  192. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.js +90 -99
  193. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.js.map +1 -0
  194. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.d.ts.map +1 -1
  195. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js +108 -148
  196. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js.map +1 -1
  197. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.d.ts +2 -0
  198. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.d.ts.map +1 -0
  199. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.js +87 -100
  200. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.js.map +1 -0
  201. package/dist/cli/lib/watchFilesChokidar.js +30 -56
  202. package/dist/cli/lib/watchFilesChokidar.js.map +1 -1
  203. package/dist/cli/lib/watchFilesChokidar.unitTest.d.ts +2 -0
  204. package/dist/cli/lib/watchFilesChokidar.unitTest.d.ts.map +1 -0
  205. package/dist/cli/lib/watchFilesChokidar.unitTest.js +77 -81
  206. package/dist/cli/lib/watchFilesChokidar.unitTest.js.map +1 -0
  207. package/dist/cli/lib/watchFilesNodeWatch.js +31 -41
  208. package/dist/cli/lib/watchFilesNodeWatch.js.map +1 -1
  209. package/dist/cli/lib/watchFilesNodeWatch.unitTest.d.ts +2 -0
  210. package/dist/cli/lib/watchFilesNodeWatch.unitTest.d.ts.map +1 -0
  211. package/dist/cli/lib/watchFilesNodeWatch.unitTest.js +41 -46
  212. package/dist/cli/lib/watchFilesNodeWatch.unitTest.js.map +1 -0
  213. package/dist/cli/once.js +35 -42
  214. package/dist/cli/once.js.map +1 -1
  215. package/dist/cli/watch.js +64 -114
  216. package/dist/cli/watch.js.map +1 -1
  217. package/dist/cli/watch.unitTest.d.ts +6 -0
  218. package/dist/cli/watch.unitTest.d.ts.map +1 -0
  219. package/dist/cli/watch.unitTest.js +100 -111
  220. package/dist/cli/watch.unitTest.js.map +1 -0
  221. package/dist/config.d.ts +1 -1
  222. package/dist/config.d.ts.map +1 -1
  223. package/dist/config.js +13 -2
  224. package/dist/config.js.map +1 -1
  225. package/dist/describe.js +20 -34
  226. package/dist/describe.js.map +1 -1
  227. package/dist/describe.unitTest.d.ts +2 -0
  228. package/dist/describe.unitTest.d.ts.map +1 -0
  229. package/dist/describe.unitTest.js +19 -23
  230. package/dist/describe.unitTest.js.map +1 -0
  231. package/dist/index.js +2 -1
  232. package/dist/indexNumberToLetters.js +12 -11
  233. package/dist/output.js +16 -18
  234. package/dist/packages/chalk.d.ts +14 -0
  235. package/dist/packages/chalk.d.ts.map +1 -0
  236. package/dist/packages/chalk.js +22 -0
  237. package/dist/packages/chalk.js.map +1 -0
  238. package/dist/packages/figures.d.ts +6 -0
  239. package/dist/packages/figures.d.ts.map +1 -0
  240. package/dist/packages/figures.js +24 -0
  241. package/dist/packages/figures.js.map +1 -0
  242. package/dist/packages/loadConfig.d.ts +3 -0
  243. package/dist/packages/loadConfig.d.ts.map +1 -0
  244. package/dist/packages/loadConfig.js +28 -0
  245. package/dist/packages/loadConfig.js.map +1 -0
  246. package/dist/packages/mergeStructuredConfig.d.ts +2 -0
  247. package/dist/packages/mergeStructuredConfig.d.ts.map +1 -0
  248. package/dist/packages/mergeStructuredConfig.js +26 -0
  249. package/dist/packages/mergeStructuredConfig.js.map +1 -0
  250. package/dist/packages/slash.d.ts +2 -0
  251. package/dist/packages/slash.d.ts.map +1 -0
  252. package/dist/packages/slash.js +9 -0
  253. package/dist/packages/slash.js.map +1 -0
  254. package/dist/packages/timeProfiler.d.ts +6 -0
  255. package/dist/packages/timeProfiler.d.ts.map +1 -0
  256. package/dist/packages/timeProfiler.js +32 -0
  257. package/dist/packages/timeProfiler.js.map +1 -0
  258. package/dist/types.d.ts +13 -13
  259. package/dist/types.d.ts.map +1 -1
  260. package/package.json +24 -20
  261. package/dist/cli/files.js +0 -20
  262. package/dist/cli/files.unitTest.js +0 -246
  263. package/dist/cli/init.unitTest.js +0 -0
  264. package/dist/cli/lib/defaultConfig.test.js +0 -9
  265. package/dist/cli/lib/loadTestFileStatic.js +0 -41
  266. package/dist/cli/lib/loadTestFileStatic.unitTest.js +0 -30
  267. package/dist/cli/lib/processWatchEvent.js +0 -1
  268. package/dist/cli/lib/processWatchEvent.unitTest.js +0 -15
  269. package/dist/cli/lib/runDescribe.old.js +0 -108
  270. package/dist/cli/lib/runDescribe.old.unitTest.js +0 -440
  271. package/dist/cli/lib/runTest-old.js +0 -160
  272. package/dist/cli/lib/runTest-old.unitTest.js +0 -184
  273. package/dist/cli/lib/watchFiles.unitTest.js +0 -50
  274. package/dist/cli/once.unitTest.js +0 -39
  275. package/dist/describe-old.js +0 -271
  276. package/dist/describe-old.unitTest.js +0 -30
  277. package/dist/exported.eslintrc.js +0 -7
  278. package/dist/lib/arrayRemove.d.ts +0 -2
  279. package/dist/lib/arrayRemove.d.ts.map +0 -1
  280. package/dist/lib/arrayRemove.js +0 -15
  281. package/dist/lib/arrayRemove.js.map +0 -1
  282. package/dist/lib/promiseAllObj.d.ts +0 -2
  283. package/dist/lib/promiseAllObj.d.ts.map +0 -1
  284. package/dist/lib/promiseAllObj.js +0 -14
  285. package/dist/lib/promiseAllObj.js.map +0 -1
  286. package/dist/testsState.js +0 -5
  287. package/dist/timeProfiling.js +0 -9
@@ -1,93 +1,93 @@
1
- import { createTimeProfiler } from 'sxy-dev-tools';
2
- import { packageName, cliName, configFileName, configLocations, showTimeProfiling } from '../../config.js';
3
- import chalk from 'chalk-extensions';
4
- import { out as mainOut, log, debug } from '../../output.js';
5
- import figures from 'figures';
6
- //import { testsState } from '../../testsState.js'
7
-
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
+ import figures from '../../packages/figures.js';
8
6
  import { indexNumberToLetters } from '../../indexNumberToLetters.js';
9
- const {
10
- timeProfileAsync
11
- } = await createTimeProfiler(showTimeProfiling);
12
- export async function showTestResult(config, testResult, customOut = undefined) {
13
- await debug('customOut', customOut);
14
- const out = customOut ? async (...texts) => await customOut(...texts) : async (...texts) => await mainOut(...texts);
15
-
16
- //console.log('testResult', testResult)
17
-
18
- await timeProfileAsync('show test result', () => {
19
- out();
20
- out(chalk.grey`File ${testResult.file}`);
21
- const indent = ' ';
22
- if (testResult.logs.length > 0) {
23
- out();
24
- out( /*indent + */chalk.grey`console.logs:`);
25
- testResult.logs.forEach(async log => {
26
- /*log[0] = indent + log[0]*/
27
- await out(...log);
28
- });
29
- out();
30
- }
31
- let first = true;
32
- for (const describeResult of testResult.describeResults) {
33
- if (!first) out();
34
- first = false;
35
- out(chalk.lightgrey`${describeResult.counter}) describing ` + chalk.brightblue(describeResult.thing));
36
- out();
37
- if (describeResult.logs.length > 0) {
38
- out( /*indent + */chalk.grey`console.logs:`);
39
- describeResult.logs.forEach(async log => {
40
- /*log[0] = indent + log[0]*/
41
- await out(...log);
42
- });
7
+ const { timeProfileAsync } = createTimeProfiler(showTimeProfiling);
8
+ export async function showTestResult(config, testResult, customOut) {
9
+ const out = customOut ?? mainOut;
10
+ await timeProfileAsync('show test result', () => {
43
11
  out();
44
- }
45
- if (describeResult.error) {
46
- const describeError = describeResult.error;
47
- const describeErrorText = typeof describeError === 'object' && describeError !== null && 'name' in describeError && 'message' in describeError && typeof describeError.name === 'string' && typeof describeError.message === 'string' ? `${describeError.name}: ${describeError.message}` : String(describeError);
48
- out(chalk.mediumred(`${indent}Threw:`));
49
- out(chalk.mediumred(`${indent}${describeErrorText}`));
50
- if (config.showErrorTrace) {
51
- const describeErrorStack = typeof describeError === 'object' && describeError !== null && 'stack' in describeError && typeof describeError.stack === 'string' ? describeError.stack : '';
52
- out();
53
- out(chalk.grey(describeErrorStack));
54
- }
55
- out();
56
- }
57
- for (const itResult of describeResult.itResults) {
58
- //console.log('itResult', itResult)
59
-
60
- const letters = indexNumberToLetters(itResult.counter);
61
- if (itResult.success) {
62
- out(chalk.lightgrey`${indent}${letters})` + chalk.mediumgreen` ${figures.tick} ${itResult.should}`);
63
- } else {
64
- out(chalk.lightgrey`${indent}${letters})` + chalk.mediumred` ${figures.cross} ${itResult.should}`);
65
- out();
66
- const spacer = `${indent}${' '.repeat(letters.length)} `;
67
- if ('actual' in itResult.error && 'expected' in itResult.error) {
68
- out(chalk.mediumred(`${spacer}${itResult.error.name}: ${itResult.error.message}`
69
- //+ `\n${spacer}expected: ${itResult.error.expected}`
70
- //+ `\n${spacer}received: ${itResult.error.actual}`
71
- ));
72
- } else {
73
- out(chalk.mediumred(`${spacer}${itResult.error.name}: ${itResult.error.message}`));
74
- }
75
- // stack trace
76
- if (config.showErrorTrace) {
12
+ out(chalk.grey `File ${testResult.file}`);
13
+ const indent = ' ';
14
+ if (testResult.logs.length > 0) {
15
+ out();
16
+ out(chalk.grey `console.logs:`);
17
+ testResult.logs.forEach(log => {
18
+ out(...log);
19
+ });
77
20
  out();
78
- out(chalk.grey(itResult.error.stack));
79
- }
80
21
  }
81
- out();
82
- if (itResult.logs.length > 0) {
83
- out( /*indent + indent + */chalk.grey`console.logs:`);
84
- itResult.logs.forEach(async log => {
85
- /*log[0] = indent + indent + log[0]*/
86
- await out(...log);
87
- });
88
- out();
22
+ let first = true;
23
+ for (const describeResult of testResult.describeResults) {
24
+ if (!first)
25
+ out();
26
+ first = false;
27
+ out(chalk.lightgrey `${describeResult.counter}) describing ` + chalk.brightblue(describeResult.thing));
28
+ out();
29
+ if (describeResult.logs && describeResult.logs.length > 0) {
30
+ out(chalk.grey `console.logs:`);
31
+ describeResult.logs.forEach(log => {
32
+ out(...log);
33
+ });
34
+ out();
35
+ }
36
+ if (describeResult.error !== undefined) {
37
+ const describeError = describeResult.error;
38
+ const describeErrorText = (typeof describeError === 'object'
39
+ && describeError !== null
40
+ && 'name' in describeError
41
+ && 'message' in describeError
42
+ && typeof describeError.name === 'string'
43
+ && typeof describeError.message === 'string')
44
+ ? `${describeError.name}: ${describeError.message}`
45
+ : String(describeError);
46
+ out(chalk.mediumred(`${indent}Threw:`));
47
+ out(chalk.mediumred(`${indent}${describeErrorText}`));
48
+ if (config.showErrorTrace) {
49
+ const describeErrorStack = (typeof describeError === 'object'
50
+ && describeError !== null
51
+ && 'stack' in describeError
52
+ && typeof describeError.stack === 'string')
53
+ ? describeError.stack
54
+ : '';
55
+ out();
56
+ out(chalk.grey(describeErrorStack));
57
+ }
58
+ out();
59
+ }
60
+ for (const itResult of describeResult.itResults) {
61
+ const letters = indexNumberToLetters(itResult.counter) ?? '';
62
+ if (itResult.success === true) {
63
+ out(chalk.lightgrey `${indent}${letters})`
64
+ + chalk.mediumgreen ` ${figures.tick} ${itResult.should}`);
65
+ }
66
+ else {
67
+ out(chalk.lightgrey `${indent}${letters})`
68
+ + chalk.mediumred ` ${figures.cross} ${itResult.should}`);
69
+ out();
70
+ const spacer = `${indent}${' '.repeat(letters.length)} `;
71
+ const err = itResult.error;
72
+ if (err) {
73
+ out(chalk.mediumred(`${spacer}${err.name}: ${err.message}`));
74
+ // stack trace
75
+ if (config.showErrorTrace) {
76
+ out();
77
+ out(chalk.grey(err.stack ?? ''));
78
+ }
79
+ }
80
+ }
81
+ out();
82
+ if (itResult.logs.length > 0) {
83
+ out(chalk.grey `console.logs:`);
84
+ itResult.logs.forEach(log => {
85
+ out(...log);
86
+ });
87
+ out();
88
+ }
89
+ }
89
90
  }
90
- }
91
- }
92
- });
93
- }
91
+ });
92
+ }
93
+ //# sourceMappingURL=showTestResult.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"showTestResult.js","sourceRoot":"","sources":["../../../src/cli/lib/showTestResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,MAAM,kBAAkB,CAAA;AACpC,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAIpE,MAAM,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAElE,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,UAAsB,EAAE,SAAiB;IAC1F,MAAM,GAAG,GAAG,SAAS,IAAI,OAAO,CAAA;IAEhC,MAAM,gBAAgB,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAC5C,GAAG,EAAE,CAAA;QACL,GAAG,CAAC,KAAK,CAAC,IAAI,CAAA,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;QAExC,MAAM,MAAM,GAAG,MAAM,CAAA;QAErB,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7B,GAAG,EAAE,CAAA;YACL,GAAG,CAAC,KAAK,CAAC,IAAI,CAAA,eAAe,CAAC,CAAA;YAC9B,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAC1B,GAAG,CAAC,GAAG,GAAG,CAAC,CA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ACxB,GAAG,CAAC,GAAG,GAAG,CAAC,CAAA;oBACf,CAAC,CAAC,CAAA;oBACF,GAAG,EAAE,CAAA;gBACT,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAA;AACN,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=showTestResult.unitTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showTestResult.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/showTestResult.unitTest.ts"],"names":[],"mappings":""}
@@ -3,190 +3,182 @@ import { showTestResult } from './showTestResult.js';
3
3
  import { applyConfigDefaults } from './applyConfigDefaults.js';
4
4
  import { loadTestFile } from './loadTestFile.js';
5
5
  import { runTest } from './runTest.js';
6
-
7
- // loadTestFile(config, testFile) ???
8
-
9
- await mochaDescribe('showTestResult() function', async function () {
10
- await mochaIt('should show the result of a single test that has been run', async function () {
11
- const config = defaultConfig;
12
- const sampleTestResult = {
13
- file: 'unitTesting/sampleTests/1.test.js',
14
- success: true,
15
- logs: [],
16
- describeResults: [{
17
- counter: 1,
18
- thing: 'Sample test 1',
19
- success: true,
20
- logs: [],
21
- itResults: [{
22
- counter: 1,
23
- should: '1 should equal 1',
24
- success: true,
25
- logs: [],
26
- time: 1,
27
- error: undefined
28
- }],
29
- itResultsSummary: {
30
- total: 1,
31
- passes: 1
32
- }
33
- }],
34
- describeResultsSummary: {
35
- total: 1,
36
- passes: 1,
37
- itsTotal: 1,
38
- itsPasses: 1
39
- }
40
- };
41
-
42
- // create a custom out function to capture the output
43
- let outBuffer = '';
44
- const customOut = (...texts) => {
45
- //console.log('custom out received:', ...texts)
46
- outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
47
- //console.log('outBuffer:', outBuffer)
48
- };
49
- await showTestResult(config, sampleTestResult, customOut);
50
-
51
- //console.log(outBuffer)
52
-
53
- await outBuffer.should.include(sampleTestResult.file);
54
-
55
- //console.log('---', sampleTestResult.describeResults[0].thing)
56
- await outBuffer.should.include(sampleTestResult.describeResults[0].thing);
57
- await outBuffer.should.include(sampleTestResult.describeResults[0].itResults[0].should);
58
- });
59
- await mochaIt('should show the result of a test with an error', async function () {
60
- const config = defaultConfig;
61
- let error;
62
- try {
63
- await (await chaiExpect(1)).to.equal(2);
64
- } catch (e) {
65
- error = e;
66
- }
67
- const sampleTestResult = {
68
- file: 'unitTesting/sampleTests/1.test.js',
69
- success: true,
70
- logs: [],
71
- describeResults: [{
72
- counter: 1,
73
- thing: 'Sample test 1',
74
- success: true,
75
- logs: [],
76
- itResults: [{
77
- counter: 1,
78
- should: '1 should equal 2',
79
- success: false,
80
- logs: [],
81
- error
82
- }],
83
- itResultsSummary: {
84
- total: 1,
85
- passes: 1
6
+ mochaDescribe('showTestResult() function', function () {
7
+ mochaIt('should show the result of a single test that has been run', async function () {
8
+ const config = defaultConfig;
9
+ const sampleTestResult = {
10
+ file: 'unitTesting/sampleTests/1.test.js',
11
+ success: true,
12
+ logs: [],
13
+ describeResults: [
14
+ {
15
+ counter: 1,
16
+ thing: 'Sample test 1',
17
+ success: true,
18
+ logs: [],
19
+ itResults: [
20
+ {
21
+ counter: 1,
22
+ should: '1 should equal 1',
23
+ success: true,
24
+ logs: [],
25
+ time: 1,
26
+ error: undefined
27
+ }
28
+ ],
29
+ itResultsSummary: {
30
+ total: 1,
31
+ passes: 1
32
+ }
33
+ }
34
+ ],
35
+ describeResultsSummary: {
36
+ total: 1,
37
+ passes: 1,
38
+ invalid: 0,
39
+ itsTotal: 1,
40
+ itsPasses: 1
41
+ }
42
+ };
43
+ // create a custom out function to capture the output
44
+ let outBuffer = '';
45
+ const customOut = (...texts) => {
46
+ outBuffer += texts.join(' ') + '\n';
47
+ };
48
+ await showTestResult(config, sampleTestResult, customOut);
49
+ outBuffer.should.include(sampleTestResult.file);
50
+ outBuffer.should.include(sampleTestResult.describeResults[0]?.thing ?? '');
51
+ outBuffer.should.include(sampleTestResult.describeResults[0]?.itResults[0]?.should ?? '');
52
+ });
53
+ mochaIt('should show the result of a test with an error', async function () {
54
+ const config = defaultConfig;
55
+ let error;
56
+ try {
57
+ chaiExpect(1).to.equal(2);
86
58
  }
87
- }],
88
- describeResultsSummary: {
89
- total: 1,
90
- passes: 1,
91
- itsTotal: 1,
92
- itsPasses: 1
93
- }
94
- };
95
-
96
- // create a custom out function to capture the output
97
- let outBuffer = '';
98
- const customOut = (...texts) => {
99
- //console.log('custom out received:', ...texts)
100
- outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
101
- //console.log('outBuffer:', outBuffer)
102
- };
103
- await showTestResult(config, sampleTestResult, customOut);
104
-
105
- //console.log(outBuffer)
106
-
107
- await outBuffer.should.include('AssertionError');
108
- await outBuffer.should.include('expected 1 to equal 2');
109
- });
110
- await mochaIt('shows test results including captured log output', async function () {
111
- const config = defaultConfig;
112
- const sampleTestResult = {
113
- file: 'unitTesting/sampleTests/1.test.js',
114
- success: true,
115
- logs: [],
116
- describeResults: [{
117
- counter: 1,
118
- thing: 'Sample test 1',
119
- success: true,
120
- logs: [['foo']],
121
- itResults: [{
122
- counter: 1,
123
- should: '1 should equal 1',
124
- success: true,
125
- time: 1,
126
- error: undefined,
127
- logs: [['bar']]
128
- }],
129
- itResultsSummary: {
130
- total: 1,
131
- passes: 1
59
+ catch (e) {
60
+ if (e instanceof Error)
61
+ error = e;
132
62
  }
133
- }],
134
- describeResultsSummary: {
135
- total: 1,
136
- passes: 1,
137
- itsTotal: 1,
138
- itsPasses: 1
139
- }
140
- };
141
-
142
- // create a custom out function to capture the output
143
- let outBuffer = '';
144
- const customOut = (...texts) => {
145
- //console.log('custom out received:', ...texts)
146
- outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
147
- //console.log('outBuffer:', outBuffer)
148
- };
149
- await showTestResult(config, sampleTestResult, customOut);
150
-
151
- //console.log(outBuffer)
152
-
153
- await outBuffer.should.include(sampleTestResult.file);
154
-
155
- //console.log('---', sampleTestResult.describeResults[0].thing)
156
- await outBuffer.should.include(sampleTestResult.describeResults[0].thing);
157
- await outBuffer.should.include('foo');
158
- await outBuffer.should.include(sampleTestResult.describeResults[0].itResults[0].should);
159
- await outBuffer.should.include('bar');
160
- });
161
- await mochaIt('shows test results including captured log output with a complex file', async function () {
162
- const config = await applyConfigDefaults({
163
- execution: {
164
- files: 'sequential',
165
- describes: 'sequential',
166
- tests: 'sequential'
167
- }
63
+ const sampleTestResult = {
64
+ file: 'unitTesting/sampleTests/1.test.js',
65
+ success: true,
66
+ logs: [],
67
+ describeResults: [
68
+ {
69
+ counter: 1,
70
+ thing: 'Sample test 1',
71
+ success: true,
72
+ logs: [],
73
+ itResults: [
74
+ {
75
+ counter: 1,
76
+ should: '1 should equal 2',
77
+ success: false,
78
+ logs: [],
79
+ time: 1,
80
+ error
81
+ }
82
+ ],
83
+ itResultsSummary: {
84
+ total: 1,
85
+ passes: 1
86
+ }
87
+ }
88
+ ],
89
+ describeResultsSummary: {
90
+ total: 1,
91
+ passes: 1,
92
+ invalid: 0,
93
+ itsTotal: 1,
94
+ itsPasses: 1
95
+ }
96
+ };
97
+ // create a custom out function to capture the output
98
+ let outBuffer = '';
99
+ const customOut = (...texts) => {
100
+ outBuffer += texts.join(' ') + '\n';
101
+ };
102
+ await showTestResult(config, sampleTestResult, customOut);
103
+ outBuffer.should.include('AssertionError');
104
+ outBuffer.should.include('expected 1 to equal 2');
105
+ });
106
+ mochaIt('shows test results including captured log output', async function () {
107
+ const config = defaultConfig;
108
+ const sampleTestResult = {
109
+ file: 'unitTesting/sampleTests/1.test.js',
110
+ success: true,
111
+ logs: [],
112
+ describeResults: [
113
+ {
114
+ counter: 1,
115
+ thing: 'Sample test 1',
116
+ success: true,
117
+ logs: [
118
+ ['foo']
119
+ ],
120
+ itResults: [
121
+ {
122
+ counter: 1,
123
+ should: '1 should equal 1',
124
+ success: true,
125
+ time: 1,
126
+ error: undefined,
127
+ logs: [
128
+ ['bar']
129
+ ]
130
+ }
131
+ ],
132
+ itResultsSummary: {
133
+ total: 1,
134
+ passes: 1
135
+ }
136
+ }
137
+ ],
138
+ describeResultsSummary: {
139
+ total: 1,
140
+ passes: 1,
141
+ invalid: 0,
142
+ itsTotal: 1,
143
+ itsPasses: 1
144
+ }
145
+ };
146
+ // create a custom out function to capture the output
147
+ let outBuffer = '';
148
+ const customOut = (...texts) => {
149
+ outBuffer += texts.join(' ') + '\n';
150
+ };
151
+ await showTestResult(config, sampleTestResult, customOut);
152
+ outBuffer.should.include(sampleTestResult.file);
153
+ outBuffer.should.include(sampleTestResult.describeResults[0]?.thing ?? '');
154
+ outBuffer.should.include('foo');
155
+ outBuffer.should.include(sampleTestResult.describeResults[0]?.itResults[0]?.should ?? '');
156
+ outBuffer.should.include('bar');
157
+ });
158
+ mochaIt('shows test results including captured log output with a complex file', async function () {
159
+ const config = applyConfigDefaults({
160
+ execution: {
161
+ files: 'sequential',
162
+ describes: 'sequential',
163
+ tests: 'sequential'
164
+ }
165
+ });
166
+ const sampleTestFile = 'unitTesting/sampleTests/logging.test.js';
167
+ const sampleTest = await loadTestFile(config, sampleTestFile);
168
+ const testResult = await runTest(config, sampleTest);
169
+ // create a custom out function to capture the output
170
+ let outBuffer = '';
171
+ const customOut = (...texts) => {
172
+ outBuffer += texts.join(' ') + '\n';
173
+ };
174
+ await showTestResult(config, testResult, customOut);
175
+ outBuffer.should.include(testResult.file);
176
+ outBuffer.should.include(testResult.describeResults[0]?.thing ?? '');
177
+ outBuffer.should.include(testResult.describeResults[0]?.itResults[0]?.should ?? '');
178
+ outBuffer.should.include('1st test log');
179
+ outBuffer.should.include('3rd test log');
180
+ outBuffer.should.include('4th test log');
181
+ outBuffer.should.include('6th test log');
168
182
  });
169
- const sampleTestFile = 'unitTesting/sampleTests/logging.test.js';
170
- const sampleTest = await loadTestFile(config, sampleTestFile);
171
- const testResult = await runTest(config, sampleTest);
172
-
173
- // create a custom out function to capture the output
174
- let outBuffer = '';
175
- const customOut = (...texts) => {
176
- //console.log('custom out received:', ...texts)
177
- outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
178
- //console.log('outBuffer:', outBuffer)
179
- };
180
- await showTestResult(config, testResult, customOut);
181
- await console.log(outBuffer);
182
- await outBuffer.should.include(testResult.file);
183
-
184
- //console.log('---', sampleTestResult.describeResults[0].thing)
185
- await outBuffer.should.include(testResult.describeResults[0].thing);
186
- await outBuffer.should.include(testResult.describeResults[0].itResults[0].should);
187
- await outBuffer.should.include('1st test log');
188
- await outBuffer.should.include('3rd test log');
189
- await outBuffer.should.include('4th test log');
190
- await outBuffer.should.include('6th test log');
191
- });
192
- });
183
+ });
184
+ //# sourceMappingURL=showTestResult.unitTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showTestResult.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/showTestResult.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,aAAa,CAAC,2BAA2B,EAAE;IACvC,OAAO,CAAC,2DAA2D,EAAE,KAAK;QACtE,MAAM,MAAM,GAAG,aAAa,CAAA;QAE5B,MAAM,gBAAgB,GAAe;YACjC,IAAI,EAAE,mCAAmC;YACzC,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,EAAE;YACR,eAAe,EAAE;gBACb;oBACI,OAAO,EAAE,CAAC;oBACV,KAAK,EAAE,eAAe;oBACtB,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE,EAAE;oBACR,SAAS,EAAE;wBACP;4BACI,OAAO,EAAE,CAAC;4BACV,MAAM,EAAE,kBAAkB;4BAC1B,OAAO,EAAE,IAAI;4BACb,IAAI,EAAE,EAAE;4BACR,IAAI,EAAE,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ACxC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;QACxC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ export interface CustomOut {
2
+ (...texts: unknown[]): void;
3
+ getOutBuffer(): string;
4
+ setOutBuffer(value: string): void;
5
+ }
6
+ export declare function makeCustomOut(): CustomOut;
7
+ //# sourceMappingURL=makeCustomOut.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeCustomOut.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/testHelpers/makeCustomOut.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACtB,CAAC,GAAG,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC3B,YAAY,IAAI,MAAM,CAAA;IACtB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC;AAED,wBAAgB,aAAa,IAAI,SAAS,CAWzC"}
@@ -0,0 +1,10 @@
1
+ export function makeCustomOut() {
2
+ let outBuffer = '';
3
+ const customOut = ((...texts) => {
4
+ outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
5
+ });
6
+ customOut.getOutBuffer = () => outBuffer;
7
+ customOut.setOutBuffer = (value) => { outBuffer = value; };
8
+ return customOut;
9
+ }
10
+ //# sourceMappingURL=makeCustomOut.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeCustomOut.js","sourceRoot":"","sources":["../../../../src/cli/lib/testHelpers/makeCustomOut.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,aAAa;IACzB,IAAI,SAAS,GAAG,EAAE,CAAA;IAElB,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,KAAgB,EAAE,EAAE;QACvC,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA,CAAC,8BAA8B;IACtE,CAAC,CAAc,CAAA;IAEf,SAAS,CAAC,YAAY,GAAG,GAAG,EAAE,CAAC,SAAS,CAAA;IACxC,SAAS,CAAC,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,GAAG,SAAS,GAAG,KAAK,CAAA,CAAC,CAAC,CAAA;IAEjE,OAAO,SAAS,CAAA;AACpB,CAAC"}
@@ -1,7 +1,5 @@
1
- import { createTimeProfiler } from 'sxy-dev-tools';
1
+ import { createTimeProfiler } from '../../packages/timeProfiler.js';
2
2
  import { showTimeProfiling } from '../../config.js';
3
- const {
4
- timeProfile,
5
- timeProfileAsync
6
- } = await createTimeProfiler(showTimeProfiling);
7
- export { timeProfile, timeProfileAsync };
3
+ const { timeProfile, timeProfileAsync } = createTimeProfiler(showTimeProfiling);
4
+ export { timeProfile, timeProfileAsync };
5
+ //# sourceMappingURL=timeProfier.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeProfier.js","sourceRoot":"","sources":["../../../src/cli/lib/timeProfier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAE/E,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"timeProfier.js","sourceRoot":"","sources":["../../../src/cli/lib/timeProfier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAE/E,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAA"}