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,40 +1,30 @@
1
1
  import { promises as fs, existsSync } from 'fs';
2
- import figures from 'figures';
3
- import { objectCopy } from 'sxy-lib-object-copy';
2
+ import figures from '../../packages/figures.js';
4
3
  import { watchFilesAndRunTestsNodeWatch } from './watchFilesAndRunTestsNodeWatch.js';
5
4
  import { applyConfigDefaults } from './applyConfigDefaults.js';
6
-
7
- // watchFiles(config, testFiles, dependencyTrees, failingTests)
8
-
9
- await mochaDescribe('watchFilesAndRunTestsNodeWatch() function', async function () {
10
- const tempFolder = 'watchTests/watchFilesAndRunTestsNodeWatch';
11
- const baseConfig = await applyConfigDefaults({
12
- testsBase: tempFolder,
13
- tests: '**/*.test.js',
14
- watch: {
15
- watchFilesBase: tempFolder,
16
- watchFiles: '**/*.js'
17
- }
18
- });
19
- await mochaIt('should run a test when a test file is changed', async function () {
20
- //this.timeout(100000)
21
-
22
- const config = await objectCopy(baseConfig);
23
-
24
- // create a custom out function to capture the output
25
- let outBuffer = '';
26
- const customOut = (...texts) => {
27
- outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
28
- };
29
- watchFilesAndRunTestsNodeWatch(config, [], {}, [], customOut);
30
-
31
- //console.log('outBuffer', outBuffer)
32
-
33
- await outBuffer.should.equal('');
34
- const testFileName = `${tempFolder}/a.test.js`;
35
- const thing = 'Sample test 1';
36
- const should = '1 should equal 1';
37
- await fs.writeFile(testFileName, `import { describe } from '../../dist/index.js'
5
+ mochaDescribe('watchFilesAndRunTestsNodeWatch() function', function () {
6
+ const tempFolder = 'watchTests/watchFilesAndRunTestsNodeWatch';
7
+ const baseConfig = applyConfigDefaults({
8
+ testsBase: tempFolder,
9
+ tests: '**/*.test.js',
10
+ watch: {
11
+ watchFilesBase: tempFolder,
12
+ watchFiles: '**/*.js'
13
+ }
14
+ });
15
+ mochaIt('should run a test when a test file is changed', async function () {
16
+ const config = structuredClone(baseConfig);
17
+ // create a custom out function to capture the output
18
+ let outBuffer = '';
19
+ const customOut = (...texts) => {
20
+ outBuffer += texts.join(' ') + '\n';
21
+ };
22
+ void watchFilesAndRunTestsNodeWatch(config, [], {}, [], customOut);
23
+ outBuffer.should.equal('');
24
+ const testFileName = `${tempFolder}/a.test.js`;
25
+ const thing = 'Sample test 1';
26
+ const should = '1 should equal 1';
27
+ void fs.writeFile(testFileName, `import { describe } from '../../dist/index.js'
38
28
  import { expect, should } from 'chai'
39
29
  should()
40
30
 
@@ -45,31 +35,30 @@ describe('${thing}', ({it}) => {
45
35
  })
46
36
 
47
37
  })`);
48
- await new Promise(async (resolve, reject) => await setTimeout(resolve, 1000));
49
- await outBuffer.should.not.equal('');
50
- await outBuffer.should.include(testFileName);
51
- await outBuffer.should.include(thing);
52
- await outBuffer.should.include(should);
53
- await outBuffer.should.include(figures.tick);
54
- });
55
- await mochaIt('should run a test when a new test file is changed', async function () {
56
- const config = await objectCopy(baseConfig);
57
-
58
- // create a custom out function to capture the output
59
- let outBuffer = '';
60
- const customOut = (...texts) => {
61
- outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
62
- };
63
- const testFileName = `${tempFolder}/b.test.js`;
64
- const thing = 'Sample test 2';
65
- const should = '2 should equal 2';
66
- if (await existsSync(testFileName)) {
67
- await fs.unlink(testFileName);
68
- }
69
- await (await existsSync(testFileName)).should.equal(false);
70
- await watchFilesAndRunTestsNodeWatch(config, [], {}, [], customOut);
71
- await outBuffer.should.equal('');
72
- await fs.writeFile(testFileName, `import { describe } from '../../dist/index.js'
38
+ await new Promise(resolve => setTimeout(resolve, 1000));
39
+ outBuffer.should.not.equal('');
40
+ outBuffer.should.include(testFileName);
41
+ outBuffer.should.include(thing);
42
+ outBuffer.should.include(should);
43
+ outBuffer.should.include(figures.tick);
44
+ });
45
+ mochaIt('should run a test when a new test file is changed', async function () {
46
+ const config = structuredClone(baseConfig);
47
+ // create a custom out function to capture the output
48
+ let outBuffer = '';
49
+ const customOut = (...texts) => {
50
+ outBuffer += texts.join(' ') + '\n';
51
+ };
52
+ const testFileName = `${tempFolder}/b.test.js`;
53
+ const thing = 'Sample test 2';
54
+ const should = '2 should equal 2';
55
+ if (existsSync(testFileName)) {
56
+ await fs.unlink(testFileName);
57
+ }
58
+ existsSync(testFileName).should.equal(false);
59
+ await watchFilesAndRunTestsNodeWatch(config, [], {}, [], customOut);
60
+ outBuffer.should.equal('');
61
+ void fs.writeFile(testFileName, `import { describe } from '../../dist/index.js'
73
62
  import { expect, should } from 'chai'
74
63
  should()
75
64
 
@@ -80,30 +69,24 @@ describe('${thing}', ({it}) => {
80
69
  })
81
70
 
82
71
  })`);
83
- await new Promise(async (resolve, reject) => await setTimeout(resolve, 1000));
84
-
85
- //console.log('out', outBuffer)
86
-
87
- await outBuffer.should.include(testFileName);
88
- await outBuffer.should.include(thing);
89
- await outBuffer.should.include(should);
90
- await outBuffer.should.include(figures.tick);
91
- });
92
- await mochaIt('removes a test from tests and dependencyTrees when it is deleted', async function () {
93
- //this.timeout(100000)
94
-
95
- const config = await objectCopy(baseConfig);
96
-
97
- // create a custom out function to capture the output
98
- let outBuffer = '';
99
- const customOut = (...texts) => {
100
- outBuffer += texts.join(' ') + '\n'; // join and save to the buffer
101
- };
102
- const testFileName = `${tempFolder}/c.test.js`;
103
- const thing = 'Sample test 3';
104
- const should = '3 should equal 3';
105
- if (!(await existsSync(testFileName))) {
106
- await fs.writeFile(testFileName, `import { describe } from '../../dist/index.js'
72
+ await new Promise(resolve => setTimeout(resolve, 1000));
73
+ outBuffer.should.include(testFileName);
74
+ outBuffer.should.include(thing);
75
+ outBuffer.should.include(should);
76
+ outBuffer.should.include(figures.tick);
77
+ });
78
+ mochaIt('removes a test from tests and dependencyTrees when it is deleted', async function () {
79
+ const config = structuredClone(baseConfig);
80
+ // create a custom out function to capture the output
81
+ let outBuffer = '';
82
+ const customOut = (...texts) => {
83
+ outBuffer += texts.join(' ') + '\n';
84
+ };
85
+ const testFileName = `${tempFolder}/c.test.js`;
86
+ const thing = 'Sample test 3';
87
+ const should = '3 should equal 3';
88
+ if (!existsSync(testFileName)) {
89
+ await fs.writeFile(testFileName, `import { describe } from '../../dist/index.js'
107
90
  import { expect, should } from 'chai'
108
91
  should()
109
92
 
@@ -114,20 +97,24 @@ describe('${thing}', ({it}) => {
114
97
  })
115
98
 
116
99
  })`);
117
- }
118
- (await existsSync(testFileName)).should.be.true;
119
- const originalTests = [testFileName];
120
- const originalDependencyTrees = {
121
- [testFileName]: ['dep-1.js', 'dep-2.js']
122
- };
123
- const tests = await objectCopy(originalTests);
124
- const dependencyTrees = await objectCopy(originalDependencyTrees);
125
- await tests.should.include.members([testFileName]);
126
- await dependencyTrees.should.include.keys([testFileName]);
127
- await watchFilesAndRunTestsNodeWatch(config, tests, dependencyTrees, [], customOut);
128
- await fs.unlink(testFileName);
129
- await new Promise(async (resolve, reject) => await setTimeout(resolve, 1000));
130
- await tests.should.not.include.members([testFileName]);
131
- await dependencyTrees.should.not.include.keys([testFileName]);
132
- });
133
- });
100
+ }
101
+ existsSync(testFileName).should.be.true;
102
+ const originalTests = [testFileName];
103
+ const originalDependencyTrees = {
104
+ [testFileName]: [
105
+ 'dep-1.js',
106
+ 'dep-2.js'
107
+ ]
108
+ };
109
+ const tests = structuredClone(originalTests);
110
+ const dependencyTrees = structuredClone(originalDependencyTrees);
111
+ tests.should.include.members([testFileName]);
112
+ dependencyTrees.should.include.keys([testFileName]);
113
+ await watchFilesAndRunTestsNodeWatch(config, tests, dependencyTrees, [], customOut);
114
+ await fs.unlink(testFileName);
115
+ await new Promise(resolve => setTimeout(resolve, 1000));
116
+ tests.should.not.include.members([testFileName]);
117
+ dependencyTrees.should.not.include.keys([testFileName]);
118
+ });
119
+ });
120
+ //# sourceMappingURL=watchFilesAndRunTestsNodeWatch.unitTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchFilesAndRunTestsNodeWatch.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesAndRunTestsN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,eAAe,CAAC,aAAa,CAAC,CAAA;QAC5C,MAAM,eAAe,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAA;QAEhE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,CAAA;QAC5C,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAA;QAEnD,MAAM,8BAA8B,CAAC,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;QAEnF,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;QAE7B,MAAM,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;QAE7D,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,CAAA;QAChD,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAA;IAC3D,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -1,60 +1,34 @@
1
- import { createTimeProfiler } from 'sxy-dev-tools';
1
+ import { createTimeProfiler } from '../../packages/timeProfiler.js';
2
2
  import { showTimeProfiling } from '../../config.js';
3
- import chalk from 'chalk-extensions';
4
- import minimatch from 'minimatch';
5
- import slash from 'slash';
6
- //import watch from 'node-watch'
3
+ import slash from '../../packages/slash.js';
7
4
  import chokidar from 'chokidar';
8
- //import nsfw from 'nsfw'
9
- import fs, { watch } from 'fs';
10
- import { out, log, debug } from '../../output.js';
11
- import { globArgCombine } from './globArgCombine.js';
5
+ import { out, debug } from '../../output.js';
12
6
  import { addBasePath } from './addBasePath.js';
13
- const {
14
- timeProfileAsync
15
- } = await createTimeProfiler(showTimeProfiling);
16
- export async function watchFilesChokidar(config, onEvent) {
17
- return await timeProfileAsync('start watching', async () => {
18
- //const testGlobs = addBaseToGlobs(config.testsBase, config.tests)
19
- //const ignoreGlobs = addBaseToGlobs(config.testsBase, config.testsIgnore)
20
-
21
- // indentify a test file
22
- const testFilter = file => minimatch(file, globArgCombine(config.tests)) && (!config.testsIgnore || !minimatch(file, globArgCombine(config.testsIgnore)));
23
-
24
- // identify a file we should be watching and responding to
25
- const watchFilter = file => (!config.watch.watchFiles || minimatch(file, globArgCombine(config.watch.watchFiles))) && (!config.watch.watchFilesIgnore || !minimatch(file, globArgCombine(config.watch.watchFilesIgnore)));
26
- if (!config.watch.watchFilesBase) {
27
- await out(`No config.watch.watchFilesBase provided, defaulting to '.'`);
28
- config.watch.watchFilesBase = '.';
29
- }
30
- const ignoreGlob = config.watch.watchFilesIgnore ? await addBasePath(config.watch.watchFilesBase, config.watch.watchFilesIgnore) : null;
31
-
32
- //log(`watch: ${config.watch.watchFilesBase}`)
33
- // log(`ignore: ${ignoreGlob}`)
34
- const watcher = await chokidar.watch(config.watch.watchFilesBase, {
35
- ignored: ignoreGlob,
36
- ignoreInitial: true
7
+ const { timeProfileAsync } = createTimeProfiler(showTimeProfiling);
8
+ export function watchFilesChokidar(config, onEvent) {
9
+ return timeProfileAsync('start watching', () => {
10
+ if (config.watch.watchFilesBase === '') {
11
+ out('No config.watch.watchFilesBase provided, defaulting to \'.\'');
12
+ config.watch.watchFilesBase = '.';
13
+ }
14
+ const ignoreGlob = config.watch.watchFilesIgnore.length > 0
15
+ ? addBasePath(config.watch.watchFilesBase, config.watch.watchFilesIgnore)
16
+ : undefined;
17
+ const watcher = chokidar.watch(config.watch.watchFilesBase, {
18
+ ignored: ignoreGlob,
19
+ ignoreInitial: true
20
+ });
21
+ watcher.on('all', (event, filename) => {
22
+ filename = slash(filename);
23
+ debug('[watch event]', filename, event);
24
+ onEvent(filename, (event === 'unlink') ? 'remove' : event);
25
+ });
26
+ return new Promise(resolve => {
27
+ watcher.on('ready', () => {
28
+ debug('chokidar watcher ready');
29
+ resolve(watcher);
30
+ });
31
+ });
37
32
  });
38
- await watcher.on('all', async (event, filename) => {
39
- //log('[watch event]', path, event)
40
- filename = await slash(filename);
41
- await debug('[watch event]', filename, event);
42
- await onEvent(filename, event === 'unlink' ? 'remove' : event);
43
- });
44
- return new Promise(async (resolve, reject) => {
45
- await watcher.on('ready', async () => {
46
- //log('chokidar watcher ready')
47
- await debug('chokidar watcher ready');
48
- await resolve(watcher);
49
- });
50
- });
51
-
52
- // watch(config.watch.watchFilesBase, { recursive: true, filter: watchFilter }, function(event, filename) {
53
- // filename = slash(filename)
54
- // debug('watch event')
55
- // onEvent(filename, event)
56
- // })
57
- });
58
-
59
- //return new Promise( () => {} ) // infinite promise to let us watch
60
- }
33
+ }
34
+ //# sourceMappingURL=watchFilesChokidar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"watchFilesChokidar.js","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesChokidar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAK9C,MAAM,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAElE,MAAM,UAAU,kBAAkB,CAAC,MAAc,EAAE,OAAmB;IAClE,OAAO,gBAAgB,CAAC,gBAAgB,EAAE,GAAG,EAAE;QAC3C,IAAI,MAAM,CAAC,KAAK,CAAC,cAAc,KAAK,EAAE,EAAE,CAAC;YACrC,GAAG,CAAC,8DAA8D,CAAC,CAAA;YACnE,MAAM,CAAC,KAAK,CAAC,cAAc,GAAG,GA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AAO,CAAC,EAAE;YACzB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;gBACrB,KAAK,CAAC,wBAAwB,CAAC,CAAA;gBAC/B,OAAO,CAAC,OAAO,CAAC,CAAA;YACpB,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACN,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=watchFilesChokidar.unitTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchFilesChokidar.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesChokidar.unitTest.ts"],"names":[],"mappings":""}
@@ -1,88 +1,84 @@
1
1
  import { promises as fs } from 'fs';
2
2
  import { watchFilesChokidar } from './watchFilesChokidar.js';
3
3
  import { applyConfigDefaults } from './applyConfigDefaults.js';
4
-
5
- // watchFiles(config, testFiles, dependencyTrees, failingTests) ???
6
-
7
- await mochaDescribe('watchFilesChokidar() function', async function () {
8
- await mochaIt('should call back when when a file change occurs', async function () {
9
- await this.timeout(12000);
10
- const config = await applyConfigDefaults({});
11
- let eventComplete = false;
12
- await watchFilesChokidar(config, async (filename, event) => {
13
- eventComplete = true;
4
+ mochaDescribe('watchFilesChokidar() function', function () {
5
+ mochaIt('should call back when when a file change occurs', async function () {
6
+ this.timeout(12000);
7
+ const config = applyConfigDefaults({});
8
+ let eventComplete = false;
9
+ await watchFilesChokidar(config, () => {
10
+ eventComplete = true;
11
+ });
12
+ void fs.writeFile('watchTests/watchFilesChokidar-file.js', 'abc');
13
+ await new Promise(resolve => {
14
+ const interval = setInterval(() => {
15
+ if (eventComplete) {
16
+ clearInterval(interval);
17
+ resolve();
18
+ }
19
+ }, 50);
20
+ });
21
+ eventComplete.should.equal(true);
14
22
  });
15
- await fs.writeFile('watchTests/watchFilesChokidar-file.js', 'abc');
16
- await new Promise(async (resolve, reject) => {
17
- const interval = await setInterval(async () => {
18
- if (eventComplete) {
19
- await clearInterval(interval);
20
- await resolve();
21
- }
22
- }, 50);
23
+ mochaIt('should call back when when a file change occurs in specified folder', async function () {
24
+ this.timeout(12000);
25
+ const config = applyConfigDefaults({
26
+ watch: {
27
+ watchFilesBase: 'watchTests/watchFilesChokidar',
28
+ watchFiles: '**/*.js'
29
+ }
30
+ });
31
+ let eventComplete = false;
32
+ await watchFilesChokidar(config, () => {
33
+ eventComplete = true;
34
+ });
35
+ void fs.writeFile('watchTests/watchFilesChokidar/a-file.js', 'abc');
36
+ await new Promise(resolve => {
37
+ const interval = setInterval(() => {
38
+ if (eventComplete) {
39
+ clearInterval(interval);
40
+ resolve();
41
+ }
42
+ }, 50);
43
+ });
44
+ eventComplete.should.equal(true);
23
45
  });
24
- await eventComplete.should.equal(true);
25
- });
26
- await mochaIt('should call back when when a file change occurs in specified folder', async function () {
27
- await this.timeout(12000);
28
- const config = await applyConfigDefaults({
29
- watch: {
30
- watchFilesBase: 'watchTests/watchFilesChokidar',
31
- watchFiles: '**/*.js'
32
- }
46
+ mochaIt('ignores a file based on ignore glob', async function () {
47
+ this.timeout(12000);
48
+ const config = applyConfigDefaults({
49
+ watch: {
50
+ watchFilesBase: 'watchTests/watchFilesChokidar',
51
+ watchFiles: '**/*.js',
52
+ watchFilesIgnore: 'ignore-file.js'
53
+ }
54
+ });
55
+ let eventComplete = false;
56
+ await watchFilesChokidar(config, () => {
57
+ eventComplete = true;
58
+ });
59
+ void fs.writeFile('watchTests/watchFilesChokidar/ignore-file.js', 'abc');
60
+ await new Promise(resolve => {
61
+ setTimeout(resolve, 1000);
62
+ });
63
+ eventComplete.should.not.equal(true);
33
64
  });
34
- let eventComplete = false;
35
- await watchFilesChokidar(config, async (filename, event) => {
36
- eventComplete = true;
65
+ mochaIt('ignores a file based on ignore globs array', async function () {
66
+ const config = applyConfigDefaults({
67
+ watch: {
68
+ watchFilesBase: 'watchTests/watchFilesChokidar',
69
+ watchFiles: '**/*.js',
70
+ watchFilesIgnore: ['first-ignore-file.js', 'ignore-file.js']
71
+ }
72
+ });
73
+ let eventComplete = false;
74
+ await watchFilesChokidar(config, () => {
75
+ eventComplete = true;
76
+ });
77
+ void fs.writeFile('watchTests/watchFilesChokidar/ignore-file.js', 'abc');
78
+ await new Promise(resolve => {
79
+ setTimeout(resolve, 1000);
80
+ });
81
+ eventComplete.should.not.equal(true);
37
82
  });
38
- await fs.writeFile('watchTests/watchFilesChokidar/a-file.js', 'abc');
39
- await new Promise(async (resolve, reject) => {
40
- const interval = await setInterval(async () => {
41
- if (eventComplete) {
42
- await clearInterval(interval);
43
- await resolve();
44
- }
45
- }, 50);
46
- });
47
- await eventComplete.should.equal(true);
48
- });
49
- await mochaIt('ignores a file based on ignore glob', async function () {
50
- await this.timeout(12000);
51
- const config = await applyConfigDefaults({
52
- watch: {
53
- watchFilesBase: 'watchTests/watchFilesChokidar',
54
- watchFiles: '**/*.js',
55
- watchFilesIgnore: 'ignore-file.js'
56
- }
57
- });
58
- let eventComplete = false;
59
- await watchFilesChokidar(config, async (filename, event) => {
60
- eventComplete = true;
61
- });
62
- await fs.writeFile('watchTests/watchFilesChokidar/ignore-file.js', 'abc');
63
- await new Promise(async (resolve, reject) => {
64
- await setTimeout(resolve, 1000);
65
- });
66
- await eventComplete.should.not.equal(true);
67
- });
68
- await mochaIt('ignores a file based on ignore globs array', async function () {
69
- //this.timeout(100000)
70
-
71
- const config = await applyConfigDefaults({
72
- watch: {
73
- watchFilesBase: 'watchTests/watchFilesChokidar',
74
- watchFiles: '**/*.js',
75
- watchFilesIgnore: ['first-ignore-file.js', 'ignore-file.js']
76
- }
77
- });
78
- let eventComplete = false;
79
- await watchFilesChokidar(config, async (filename, event) => {
80
- eventComplete = true;
81
- });
82
- await fs.writeFile('watchTests/watchFilesChokidar/ignore-file.js', 'abc');
83
- await new Promise(async (resolve, reject) => {
84
- await setTimeout(resolve, 1000);
85
- });
86
- await eventComplete.should.not.equal(true);
87
- });
88
- });
83
+ });
84
+ //# sourceMappingURL=watchFiles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AI,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,4CAA4C,EAAE,KAAK;QACvD,MAAM,MAAM,GAAG,mBAAmB,CAAC;YAC/B,KAAK,EAAE;gBACH,cAAc,EAAE,+BAA+B;gBAC/C,UAAU,EAAE,SAAS;gBACrB,gBAAgB,EAAE,CAAC,sBAAsB,EAAE,gBAAgB,CAAC;aAC/D;SACJ,CAAC,CAAA;QAEF,IAAI,aAAa,GAAG,KAAK,CAAA;QAEzB,MAAM,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE;YAClC,aAAa,GAAG,IAAI,CAAA;QACxB,CAAC,CAAC,CAAA;QAEF,KAAK,EAAE,CAAC,SAAS,CAAC,8CAA8C,EAAE,KAAK,CAAC,CAAA;QAExE,MAAM,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;YAC9B,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QAC7B,CAAC,CAAC,CAAA;QAEF,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -1,45 +1,35 @@
1
- import { createTimeProfiler } from 'sxy-dev-tools';
1
+ import { createTimeProfiler } from '../../packages/timeProfiler.js';
2
2
  import { showTimeProfiling } from '../../config.js';
3
- import chalk from 'chalk-extensions';
4
3
  import minimatch from 'minimatch';
5
- import slash from 'slash';
6
- import watch from 'node-watch';
7
- //import chokidar from 'chokidar'
8
- //import nsfw from 'nsfw'
9
- import fs from 'fs';
10
- import { out, log, debug } from '../../output.js';
4
+ import slash from '../../packages/slash.js';
5
+ import * as nodeWatchNS from 'node-watch';
6
+ import { out, debug } from '../../output.js';
11
7
  import { globArgCombine } from './globArgCombine.js';
12
- const {
13
- timeProfileAsync
14
- } = await createTimeProfiler(showTimeProfiling);
15
- export async function watchFilesNodeWatch(config, onEvent) {
16
- await timeProfileAsync('start watching', async () => {
17
- //const testGlobs = addBaseToGlobs(config.testsBase, config.tests)
18
- //const ignoreGlobs = addBaseToGlobs(config.testsBase, config.testsIgnore)
19
-
20
- // indentify a test file
21
-
22
- // identify a file we should be watching and responding to
23
- const watchFilter = file => (!config.watch.watchFiles || minimatch(file, globArgCombine(config.watch.watchFiles))) && (!config.watch.watchFilesIgnore || !minimatch(file, globArgCombine(config.watch.watchFilesIgnore)));
24
- if (!config.watch.watchFilesBase) {
25
- await out(`No config.watch.watchFilesBase provided, defaulting to '.'`);
26
- config.watch.watchFilesBase = '.';
27
- }
28
- const watcher = await watch(config.watch.watchFilesBase, {
29
- recursive: true,
30
- filter: watchFilter
31
- }, async function (event, filename) {
32
- filename = await slash(filename);
33
- await debug('watch event');
34
- await onEvent(filename, event);
8
+ const { timeProfileAsync } = createTimeProfiler(showTimeProfiling);
9
+ const nodeWatch = nodeWatchNS.default;
10
+ export function watchFilesNodeWatch(config, onEvent) {
11
+ return timeProfileAsync('start watching', async () => {
12
+ // identify a file we should be watching and responding to
13
+ const watchFilter = (file) => (config.watch.watchFiles.length === 0 || minimatch(file, globArgCombine(config.watch.watchFiles)))
14
+ && (config.watch.watchFilesIgnore.length === 0
15
+ || !minimatch(file, globArgCombine(config.watch.watchFilesIgnore)));
16
+ if (config.watch.watchFilesBase === '') {
17
+ out('No config.watch.watchFilesBase provided, defaulting to \'.\'');
18
+ config.watch.watchFilesBase = '.';
19
+ }
20
+ const watcher = nodeWatch(config.watch.watchFilesBase, {
21
+ recursive: true,
22
+ filter: watchFilter
23
+ }, (event, filename) => {
24
+ filename = slash(filename);
25
+ debug('watch event');
26
+ onEvent(filename, event);
27
+ });
28
+ // wait until the watcher is ready
29
+ await new Promise(resolve => {
30
+ watcher.on('ready', resolve);
31
+ });
32
+ return watcher;
35
33
  });
36
-
37
- // wait until the watcher is ready
38
- await new Promise(async (resolve, reject) => {
39
- await watcher.on('ready', resolve);
40
- });
41
- return watcher;
42
- });
43
-
44
- //return new Promise( () => {} ) // infinite promise to let us watch
45
- }
34
+ }
35
+ //# sourceMappingURL=watchFilesNodeWatch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"watchFilesNodeWatch.js","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesNodeWatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,SAAS,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,WAAW,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAIpD,MAAM,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AAalE,MAAM,SAAS,GAAG,WAAW,CAAC,OAAiC,CAAA;AAI/D,MAAM,UAAU,mBAAmB,CAAC,MAAc,EAAE,OAAmB;IACnE,OAAO,gBAAgB,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;QACjD,0DAA0D;QAC1D,MAAM,WAAW,GAAG,CAAC,IAAY,EAAW,EAAE,CAC1C,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,SAAS,CAAC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;eAC/F,CACC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC;mBACvC,CAAC,SAAS,CAAC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CACrE,CAAA;QAEL,IAAI,MAAM,CAAC,KAAK,CAAC,cAAc,KAAK,EAAE,EAAE,CAAC;YACrC,GAAG,CAAC,8DAA8D,CAAC,CAA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1 @@
1
+ {"version":3,"file":"watchFilesNodeWatch.unitTest.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesNodeWatch.unitTest.ts"],"names":[],"mappings":""}