sxy-test-runner 2.2.17 → 2.3.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 (73) hide show
  1. package/dist/cli/lib/buildDependencyTrees.d.ts +1 -1
  2. package/dist/cli/lib/buildDependencyTrees.d.ts.map +1 -1
  3. package/dist/cli/lib/buildDependencyTrees.js.map +1 -1
  4. package/dist/cli/lib/buildDependencyTrees.unitTest.js +1 -1
  5. package/dist/cli/lib/buildDependencyTrees.unitTest.js.map +1 -1
  6. package/dist/cli/lib/findTestFiles.d.ts +1 -1
  7. package/dist/cli/lib/findTestFiles.d.ts.map +1 -1
  8. package/dist/cli/lib/findTestFiles.js +3 -3
  9. package/dist/cli/lib/findTestFiles.js.map +1 -1
  10. package/dist/cli/lib/findTestFiles.unitTest.js +2 -2
  11. package/dist/cli/lib/findTestFiles.unitTest.js.map +1 -1
  12. package/dist/cli/lib/handleUserInput.d.ts +4 -0
  13. package/dist/cli/lib/handleUserInput.d.ts.map +1 -0
  14. package/dist/cli/lib/handleUserInput.js +32 -0
  15. package/dist/cli/lib/handleUserInput.js.map +1 -0
  16. package/dist/cli/lib/handleUserInput.unitTest.d.ts +2 -0
  17. package/dist/cli/lib/handleUserInput.unitTest.d.ts.map +1 -0
  18. package/dist/cli/lib/handleUserInput.unitTest.js +99 -0
  19. package/dist/cli/lib/handleUserInput.unitTest.js.map +1 -0
  20. package/dist/cli/lib/listenToUser.d.ts +4 -5
  21. package/dist/cli/lib/listenToUser.d.ts.map +1 -1
  22. package/dist/cli/lib/listenToUser.js +13 -28
  23. package/dist/cli/lib/listenToUser.js.map +1 -1
  24. package/dist/cli/lib/listenToUser.unitTest.js +17 -41
  25. package/dist/cli/lib/listenToUser.unitTest.js.map +1 -1
  26. package/dist/cli/lib/makeWatchRunState.d.ts +11 -0
  27. package/dist/cli/lib/makeWatchRunState.d.ts.map +1 -0
  28. package/dist/cli/lib/makeWatchRunState.js +19 -0
  29. package/dist/cli/lib/makeWatchRunState.js.map +1 -0
  30. package/dist/cli/lib/reRunManager.d.ts +18 -0
  31. package/dist/cli/lib/reRunManager.d.ts.map +1 -0
  32. package/dist/cli/lib/reRunManager.js +67 -0
  33. package/dist/cli/lib/reRunManager.js.map +1 -0
  34. package/dist/cli/lib/reRunManager.unitTest.d.ts +2 -0
  35. package/dist/cli/lib/reRunManager.unitTest.d.ts.map +1 -0
  36. package/dist/cli/lib/reRunManager.unitTest.js +74 -0
  37. package/dist/cli/lib/reRunManager.unitTest.js.map +1 -0
  38. package/dist/cli/lib/runDescribeRun.d.ts.map +1 -1
  39. package/dist/cli/lib/runDescribeRun.js.map +1 -1
  40. package/dist/cli/lib/runTests.d.ts +4 -2
  41. package/dist/cli/lib/runTests.d.ts.map +1 -1
  42. package/dist/cli/lib/runTests.js +14 -17
  43. package/dist/cli/lib/runTests.js.map +1 -1
  44. package/dist/cli/lib/runTests.unitTest.d.ts.map +1 -1
  45. package/dist/cli/lib/runTests.unitTest.js +31 -33
  46. package/dist/cli/lib/runTests.unitTest.js.map +1 -1
  47. package/dist/cli/lib/watchFilesAndRunTests.unitTest.js +15 -7
  48. package/dist/cli/lib/watchFilesAndRunTests.unitTest.js.map +1 -1
  49. package/dist/cli/lib/watchFilesAndRunTestsChokidar.d.ts +1 -2
  50. package/dist/cli/lib/watchFilesAndRunTestsChokidar.d.ts.map +1 -1
  51. package/dist/cli/lib/watchFilesAndRunTestsChokidar.js +130 -111
  52. package/dist/cli/lib/watchFilesAndRunTestsChokidar.js.map +1 -1
  53. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.js +125 -122
  54. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.js.map +1 -1
  55. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.d.ts +3 -2
  56. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.d.ts.map +1 -1
  57. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js +25 -9
  58. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js.map +1 -1
  59. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.js +15 -7
  60. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.js.map +1 -1
  61. package/dist/cli/once.d.ts.map +1 -1
  62. package/dist/cli/once.js +3 -3
  63. package/dist/cli/once.js.map +1 -1
  64. package/dist/cli/watch.d.ts.map +1 -1
  65. package/dist/cli/watch.js +26 -18
  66. package/dist/cli/watch.js.map +1 -1
  67. package/dist/testing/makeTestReRunManager.d.ts +4 -0
  68. package/dist/testing/makeTestReRunManager.d.ts.map +1 -0
  69. package/dist/testing/makeTestReRunManager.js +6 -0
  70. package/dist/testing/makeTestReRunManager.js.map +1 -0
  71. package/dist/types.d.ts +0 -4
  72. package/dist/types.d.ts.map +1 -1
  73. package/package.json +7 -6
@@ -1,112 +1,131 @@
1
- import { createTimeProfiler } from '../../packages/timeProfiler.js';
2
- import { showTimeProfiling } from '../../config.js';
3
- import chalk from '../../packages/chalk.js';
4
- import minimatch from 'minimatch';
5
- import slash from '../../packages/slash.js';
6
- import { out, log, debug } from '../../output.js';
7
- import { runTests } from './runTests.js';
8
- import { buildDependencyTree } from './buildDependencyTree.js';
9
- import { globArgCombine } from './globArgCombine.js';
10
- import { watchFilesChokidar } from './watchFilesChokidar.js';
11
- import { filter } from './filter.js';
12
- import { remove as arrayRemove } from 'sxy-lib/arrays.js';
13
- const { timeProfileAsync } = createTimeProfiler(showTimeProfiling);
14
- export async function watchFilesAndRunTestsChokidar(config, testFiles, dependencyTrees, failingTests, watchRunState, customOut, testFilesFilter, executionFilters = {}) {
15
- const projectDir = process.cwd();
16
- await timeProfileAsync('start watching', async () => {
17
- let changedFiles = [];
18
- let timeout = null;
19
- const testFilter = (file) => {
20
- return minimatch(file, globArgCombine(config.tests))
21
- && !minimatch(file, globArgCombine(config.testsIgnore))
22
- && (config.testsFilter === undefined
23
- || config.testsFilter === ''
24
- || filter(config.testsBase, config.testsFilter, file));
25
- };
26
- // start watching
27
- await watchFilesChokidar(config, watchEvent);
28
- function watchEvent(filename, event) {
29
- debug('chokidar watch event', filename, event);
30
- // remove dep tree for any tests that are deleted, avoiding trying to run it later
31
- if (event === 'remove' && filename in dependencyTrees) {
32
- arrayRemove(testFiles, filename);
33
- delete dependencyTrees[filename];
34
- }
35
- // info on the event found
36
- out(chalk.grey `change: ${filename} (${event})`);
37
- // add the file to changed files
38
- changedFiles.push([filename, event]);
39
- // wait 100ms after any change before processing, to avoid multiple execution?
40
- if (timeout) {
41
- clearTimeout(timeout);
42
- }
43
- timeout = setTimeout(() => {
44
- void timeProfileAsync('handle changed files', async () => {
45
- debug('changed files', changedFiles);
46
- try {
47
- // build related test list
48
- const tests = [];
49
- for (const [file, fileEvent] of changedFiles) {
50
- debug('check', file);
51
- debug('1 tests', tests);
52
- if (fileEvent !== 'remove') { // only check if it's a test if it exists (has not just been removed)
53
- if (testFilter(file)) { // it is a test file itself, add to run list
54
- debug('its a test', file);
55
- tests.push(file);
56
- if (!(file in dependencyTrees)) { // if its a new test
57
- debug('try to add a new test', file);
58
- addNewTest(file);
59
- }
60
- }
61
- }
62
- debug('dtrees', dependencyTrees);
63
- debug('2 tests', tests);
64
- for (const f of Object.getOwnPropertyNames(dependencyTrees)) {
65
- debug('dep tree', f, dependencyTrees[f]);
66
- if (dependencyTrees[f]?.some(dep => dep === file) === true) { // a test depends on this file
67
- debug('its a dependency', file);
68
- tests.push(f);
69
- }
70
- }
71
- }
72
- changedFiles = [];
73
- debug('tests', tests);
74
- if (tests.length) {
75
- await timeProfileAsync('run tests related to changes', async () => {
76
- debug('tests', tests);
77
- // NOTE: the original guarded a stale-failing-test cleanup here with
78
- // `config.reRunFailingTests` (missing the `.watch.` prefix used everywhere
79
- // else), which is always undefined - so it never ran. Preserved as dead
80
- // code rather than newly activating it as part of a TS conversion.
81
- debug('tests', tests);
82
- debug('failingTests', failingTests);
83
- debug('reRunFailingTests', config.watch.reRunFailingTests);
84
- const toTest = config.watch.reRunFailingTests
85
- ? [...new Set([...tests, ...failingTests])].reverse()
86
- : [...tests].reverse();
87
- debug('run tests on change');
88
- debug('toTest', toTest);
89
- await runTests(config, toTest, failingTests, 'refresh', watchRunState, customOut, executionFilters);
90
- });
91
- }
92
- }
93
- catch (e) {
94
- log('watch handler error', e);
95
- }
96
- });
97
- }, 33);
98
- } // end of watch event
99
- function addNewTest(testFile) {
100
- debug('new test', testFile);
101
- const dependencyTree = buildDependencyTree(config, testFile);
102
- dependencyTrees[testFile] = dependencyTree
103
- .map(file => slash(file).slice(projectDir.length + 1))
104
- .filter(f => f !== testFile);
105
- }
106
- });
107
- // NOTE: "watching..." is intentionally NOT printed here. watch() already emits it,
108
- // tied to a real milestone (the initial test run finishing, or no tests found).
109
- // Printing it again here produced a duplicate "watching..." on every startup.
110
- // out(chalk.brightblue`watching...`)
111
- }
1
+ // import { createTimeProfiler } from '../../packages/timeProfiler.js'
2
+ // import { showTimeProfiling } from '../../config.js'
3
+ // import chalk from '../../packages/chalk.js'
4
+ // import minimatch from 'minimatch'
5
+ // import slash from '../../packages/slash.js'
6
+ // import { out, log, debug } from '../../output.js'
7
+ export {};
8
+ // import { runTests } from './runTests.js'
9
+ // import { buildDependencyTree } from './buildDependencyTree.js'
10
+ // import { globArgCombine } from './globArgCombine.js'
11
+ // import { watchFilesChokidar } from './watchFilesChokidar.js'
12
+ // import { filter } from './filter.js'
13
+ // import { remove as arrayRemove } from 'sxy-lib/arrays.js'
14
+ // import type { FinalConfig, DependencyTrees, OutFn, TestExecutionFilters } from '../../types.js'
15
+ // import { ReRunManageState } from './makeWatchRunState.js'
16
+ // import { ReRunManager } from './reRunManager.js'
17
+ // const { timeProfileAsync } = createTimeProfiler(showTimeProfiling)
18
+ // export async function watchFilesAndRunTestsChokidar(
19
+ // config: FinalConfig,
20
+ // testFiles: string[],
21
+ // dependencyTrees: DependencyTrees,
22
+ // failingTests: string[],
23
+ // reRunManager: ReRunManager, // still needs to be incopr
24
+ // watchRunState: ReRunManageState,
25
+ // customOut?: OutFn,
26
+ // executionFilters: TestExecutionFilters = {}
27
+ // ): Promise<void> {
28
+ // const projectDir = process.cwd()
29
+ // await timeProfileAsync('start watching', async () => {
30
+ // let changedFiles: Array<[string, string]> = []
31
+ // let timeout: ReturnType<typeof setTimeout> | null = null
32
+ // const testFilter = (file: string): boolean => {
33
+ // return minimatch(file, globArgCombine(config.tests))
34
+ // && !minimatch(file, globArgCombine(config.testsIgnore))
35
+ // && (
36
+ // config.testsFilter === undefined
37
+ // || config.testsFilter === ''
38
+ // || filter(config.testsBase, config.testsFilter, file)
39
+ // )
40
+ // }
41
+ // // start watching
42
+ // await watchFilesChokidar(config, watchEvent)
43
+ // function watchEvent(filename: string, event: string): void {
44
+ // debug('chokidar watch event', filename, event)
45
+ // // remove dep tree for any tests that are deleted, avoiding trying to run it later
46
+ // if (event === 'remove' && filename in dependencyTrees) {
47
+ // arrayRemove(testFiles, filename)
48
+ // delete dependencyTrees[filename]
49
+ // }
50
+ // // info on the event found
51
+ // out(chalk.grey`change: ${filename} (${event})`)
52
+ // // add the file to changed files
53
+ // changedFiles.push([filename, event])
54
+ // // wait 100ms after any change before processing, to avoid multiple execution?
55
+ // if (timeout) {
56
+ // clearTimeout(timeout)
57
+ // }
58
+ // timeout = setTimeout(() => {
59
+ // void timeProfileAsync('handle changed files', async () => {
60
+ // debug('changed files', changedFiles)
61
+ // try {
62
+ // // build related test list
63
+ // const tests: string[] = []
64
+ // for (const [file, fileEvent] of changedFiles) {
65
+ // debug('check', file)
66
+ // debug('1 tests', tests)
67
+ // if (fileEvent !== 'remove') { // only check if it's a test if it exists (has not just been removed)
68
+ // if (testFilter(file)) { // it is a test file itself, add to run list
69
+ // debug('its a test', file)
70
+ // tests.push(file)
71
+ // if (!(file in dependencyTrees)) { // if its a new test
72
+ // debug('try to add a new test', file)
73
+ // addNewTest(file)
74
+ // }
75
+ // }
76
+ // }
77
+ // debug('dtrees', dependencyTrees)
78
+ // debug('2 tests', tests)
79
+ // for (const f of Object.getOwnPropertyNames(dependencyTrees)) {
80
+ // debug('dep tree', f, dependencyTrees[f])
81
+ // if (dependencyTrees[f]?.some(dep => dep === file) === true) { // a test depends on this file
82
+ // debug('its a dependency', file)
83
+ // tests.push(f)
84
+ // }
85
+ // }
86
+ // }
87
+ // changedFiles = []
88
+ // debug('tests', tests)
89
+ // if (tests.length) {
90
+ // await timeProfileAsync('run tests related to changes', async () => {
91
+ // debug('tests', tests)
92
+ // debug('tests', tests)
93
+ // debug('failingTests', failingTests)
94
+ // debug('reRunFailingTests', config.watch.reRunFailingTests)
95
+ // const toTest = config.watch.reRunFailingTests
96
+ // ? [...new Set([...tests, ...failingTests])].reverse()
97
+ // : [...tests].reverse()
98
+ // debug('run tests on change')
99
+ // debug('toTest', toTest)
100
+ // watchRunState.currentRun = runTests(
101
+ // config,
102
+ // toTest,
103
+ // failingTests,
104
+ // 'refresh',
105
+ // watchRunState,
106
+ // customOut,
107
+ // executionFilters
108
+ // )
109
+ // await watchRunState.currentRun
110
+ // })
111
+ // }
112
+ // } catch (e) {
113
+ // log('watch handler error', e)
114
+ // }
115
+ // })
116
+ // }, 33)
117
+ // } // end of watch event
118
+ // function addNewTest(testFile: string): void {
119
+ // debug('new test', testFile)
120
+ // const dependencyTree = buildDependencyTree(config, testFile)
121
+ // dependencyTrees[testFile] = dependencyTree
122
+ // .map(file => slash(file).slice(projectDir.length + 1))
123
+ // .filter(f => f !== testFile)
124
+ // }
125
+ // })
126
+ // // NOTE: "watching..." is intentionally NOT printed here. watch() already emits it,
127
+ // // tied to a real milestone (the initial test run finishing, or no tests found).
128
+ // // Printing it again here produced a duplicate "watching..." on every startup.
129
+ // // out(chalk.brightblue`watching...`)
130
+ // }
112
131
  //# sourceMappingURL=watchFilesAndRunTestsChokidar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"watchFilesAndRunTestsChokidar.js","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesAndRunTestsChokidar.ts"],"names":[],"mappings":"A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C;iBACrD,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAA;QACpC,CAAC;IACL,CAAC,CAAC,CAAA;IAEF,mFAAmF;IACnF,gFAAgF;IAChF,8EAA8E;IAC9E,qCAAqC;AACzC,CAAC"}
1
+ {"version":3,"file":"watchFilesAndRunTestsChokidar.js","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesAndRunTestsChokidar.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,sDAAsD;AACtD,8CAA8C;AAC9C,oCAAoC;AACpC,8CAA8C;AAC9C,oDAAoD;;AAEpD,2CAA2C;AAC3C,iEAAiE;AACjE,uDAAuD;AACvD,+DAA+D;AAC/D,uCAAuC;AACvC,4DAA4D;AAE5D,kGAAkG;AAClG,4DAA4D;AAC5D,mDAAmD;AAEnD,qEAAqE;AAErE,uDAAuD;AACvD,2BAA2B;AAC3B,2BAA2B;AAC3B,wCAAwC;AACxC,8BAA8B;AAC9B,8DAA8D;AAC9D,uCAAuC;AACvC,yBAAyB;AACzB,kDAAkD;AAClD,qBAAqB;AACrB,uCAAuC;AAEvC,6DAA6D;AAC7D,yDAAyD;AACzD,mEAAmE;AAEnE,0DAA0D;AAC1D,mEAAmE;AACnE,0EAA0E;AAC1E,uBAAuB;AACvB,uDAAuD;AACvD,mDAAmD;AACnD,4EAA4E;AAC5E,oBAAoB;AACpB,YAAY;AAEZ,4BAA4B;AAC5B,uDAAuD;AAEvD,uEAAuE;AACvE,6DAA6D;AAE7D,iGAAiG;AACjG,uEAAuE;AACvE,mDAAmD;AACnD,mDAAmD;AACnD,gBAAgB;AAEhB,yCAAyC;AACzC,8DAA8D;AAE9D,+CAA+C;AAC/C,mDAAmD;AAEnD,6FAA6F;AAC7F,6BAA6B;AAC7B,wCAAwC;AACxC,gBAAgB;AAEhB,2CAA2C;AAC3C,8EAA8E;AAC9E,2DAA2D;AAC3D,4BAA4B;AAC5B,qDAAqD;AACrD,qDAAqD;AACrD,0EAA0E;AAC1E,mDAAmD;AACnD,sDAAsD;AACtD,kIAAkI;AAClI,uGAAuG;AACvG,gEAAgE;AAChE,uDAAuD;AACvD,6FAA6F;AAC7F,+EAA+E;AAC/E,2DAA2D;AAC3D,wCAAwC;AACxC,oCAAoC;AACpC,gCAAgC;AAChC,+DAA+D;AAC/D,sDAAsD;AACtD,6FAA6F;AAC7F,2EAA2E;AAC3E,+HAA+H;AAC/H,sEAAsE;AACtE,oDAAoD;AACpD,oCAAoC;AACpC,gCAAgC;AAChC,4BAA4B;AAE5B,4CAA4C;AAE5C,gDAAgD;AAEhD,8CAA8C;AAC9C,mGAAmG;AACnG,wDAAwD;AAExD,wDAAwD;AACxD,sEAAsE;AACtE,6FAA6F;AAE7F,gFAAgF;AAChF,4FAA4F;AAC5F,6DAA6D;AAE7D,+DAA+D;AAC/D,0DAA0D;AAE1D,uEAAuE;AACvE,8CAA8C;AAC9C,8CAA8C;AAC9C,oDAAoD;AACpD,iDAAiD;AACjD,qDAAqD;AACrD,iDAAiD;AACjD,uDAAuD;AACvD,oCAAoC;AACpC,iEAAiE;AACjE,iCAAiC;AACjC,4BAA4B;AAC5B,oCAAoC;AACpC,wDAAwD;AACxD,wBAAwB;AACxB,qBAAqB;AACrB,qBAAqB;AACrB,kCAAkC;AAElC,wDAAwD;AACxD,0CAA0C;AAC1C,2EAA2E;AAC3E,yDAAyD;AACzD,yEAAyE;AACzE,+CAA+C;AAC/C,YAAY;AACZ,SAAS;AAET,0FAA0F;AAC1F,uFAAuF;AACvF,qFAAqF;AACrF,4CAA4C;AAC5C,IAAI"}
@@ -1,123 +1,126 @@
1
- import { promises as fs, existsSync } from 'fs';
2
- import figures from '../../packages/figures.js';
3
- import { watchFilesAndRunTestsChokidar } from './watchFilesAndRunTestsChokidar.js';
4
- import { applyConfigDefaults } from './applyConfigDefaults.js';
5
- mochaDescribe('watchFilesAndRunTestsChokidar() function', function () {
6
- const tempFolder = 'watchTests/watchFilesAndRunTestsChokidar';
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
- // ignore the file from the last test, causing load errors
18
- config.testsIgnore = '**/c.test.js';
19
- // create a custom out function to capture the output
20
- let outBuffer = '';
21
- const customOut = (...texts) => {
22
- outBuffer += texts.join(' ') + '\n';
23
- };
24
- const testFileName = 'watchTests/watchFilesAndRunTestsChokidar/a.test.js';
25
- const thing = 'Sample test 1';
26
- const should = '1 should equal 1';
27
- await watchFilesAndRunTestsChokidar(config, [], {}, [], undefined, customOut);
28
- outBuffer.should.equal('');
29
- void fs.writeFile(testFileName, `import { describe } from '../../dist/index.js'
30
- import { expect, should } from 'chai'
31
- should()
32
-
33
- describe('${thing}', ({it}) => {
34
-
35
- it('${should}', () => {
36
- expect(1).to.equal(1)
37
- })
38
-
39
- })`);
40
- await new Promise(resolve => setTimeout(resolve, 1000));
41
- outBuffer.should.include(testFileName);
42
- outBuffer.should.include(thing);
43
- outBuffer.should.include(should);
44
- outBuffer.should.include(figures.tick);
45
- });
46
- mochaIt('should run a test when a new test file is changed', async function () {
47
- const config = structuredClone(baseConfig);
48
- // ignore the file from the last test, causing load errors
49
- config.testsIgnore = '**/c.test.js';
50
- // create a custom out function to capture the output
51
- let outBuffer = '';
52
- const customOut = (...texts) => {
53
- outBuffer += texts.join(' ') + '\n';
54
- };
55
- const testFileName = `${tempFolder}/b.test.js`;
56
- const thing = 'Sample test 2';
57
- const should = '2 should equal 2';
58
- if (existsSync(testFileName)) {
59
- await fs.unlink(testFileName);
60
- }
61
- existsSync(testFileName).should.equal(false);
62
- await watchFilesAndRunTestsChokidar(config, [], {}, [], undefined, customOut);
63
- outBuffer.should.equal('');
64
- void fs.writeFile(testFileName, `import { describe } from '../../dist/index.js'
65
- import { expect, should } from 'chai'
66
- should()
67
-
68
- describe('${thing}', ({it}) => {
69
-
70
- it('${should}', () => {
71
- expect(2).to.equal(2)
72
- })
73
-
74
- })`);
75
- await new Promise(resolve => setTimeout(resolve, 1000));
76
- outBuffer.should.include(testFileName);
77
- outBuffer.should.include(thing);
78
- outBuffer.should.include(should);
79
- outBuffer.should.include(figures.tick);
80
- });
81
- mochaIt('removes a test from tests and dependencyTrees when it is deleted', async function () {
82
- const config = structuredClone(baseConfig);
83
- // create a custom out function to capture the output
84
- let outBuffer = '';
85
- const customOut = (...texts) => {
86
- outBuffer += texts.join(' ') + '\n';
87
- };
88
- const testFileName = `${tempFolder}/c.test.js`;
89
- const thing = 'Sample test 3';
90
- const should = '3 should equal 3';
91
- if (!existsSync(testFileName)) {
92
- await fs.writeFile(testFileName, `import { describe } from '../../dist/index.js'
93
- import { expect, should } from 'chai'
94
- should()
95
-
96
- describe('${thing}', ({it}) => {
97
-
98
- it('${should}', () => {
99
- expect(3).to.equal(3)
100
- })
101
-
102
- })`);
103
- }
104
- existsSync(testFileName).should.be.true;
105
- const originalTests = [testFileName];
106
- const originalDependencyTrees = {
107
- [testFileName]: [
108
- 'dep-1.js',
109
- 'dep-2.js'
110
- ]
111
- };
112
- const tests = structuredClone(originalTests);
113
- const dependencyTrees = structuredClone(originalDependencyTrees);
114
- tests.should.include.members([testFileName]);
115
- dependencyTrees.should.include.keys([testFileName]);
116
- await watchFilesAndRunTestsChokidar(config, tests, dependencyTrees, [], undefined, customOut);
117
- await fs.unlink(testFileName);
118
- await new Promise(resolve => setTimeout(resolve, 1000));
119
- tests.should.not.include.members([testFileName]);
120
- dependencyTrees.should.not.include.keys([testFileName]);
121
- });
122
- });
1
+ // import { promises as fs, existsSync } from 'fs'
2
+ // import figures from '../../packages/figures.js'
3
+ export {};
4
+ // import { watchFilesAndRunTestsChokidar } from './watchFilesAndRunTestsChokidar.js'
5
+ // import { applyConfigDefaults } from './applyConfigDefaults.js'
6
+ // import type { DependencyTrees } from '../../types.js'
7
+ // import { makeRunManagerState } from './makeWatchRunState.js'
8
+ // mochaDescribe('watchFilesAndRunTestsChokidar() function', function () {
9
+ // const tempFolder = 'watchTests/watchFilesAndRunTestsChokidar'
10
+ // const baseConfig = applyConfigDefaults({
11
+ // testsBase: tempFolder,
12
+ // tests: '**/*.test.js',
13
+ // watch: {
14
+ // watchFilesBase: tempFolder,
15
+ // watchFiles: '**/*.js'
16
+ // }
17
+ // })
18
+ // mochaIt('should run a test when a test file is changed', async function () {
19
+ // const config = structuredClone(baseConfig)
20
+ // // ignore the file from the last test, causing load errors
21
+ // config.testsIgnore = '**/c.test.js'
22
+ // // create a custom out function to capture the output
23
+ // let outBuffer = ''
24
+ // const customOut = (...texts: unknown[]): void => {
25
+ // outBuffer += texts.join(' ') + '\n'
26
+ // }
27
+ // const testFileName = 'watchTests/watchFilesAndRunTestsChokidar/a.test.js'
28
+ // const thing = 'Sample test 1'
29
+ // const should = '1 should equal 1'
30
+ // await watchFilesAndRunTestsChokidar(config, [], {}, [], makeRunManagerState(), customOut)
31
+ // outBuffer.should.equal('')
32
+ // void fs.writeFile(
33
+ // testFileName,
34
+ // `import { describe } from '../../dist/index.js'
35
+ // import { expect, should } from 'chai'
36
+ // should()
37
+ // describe('${thing}', ({it}) => {
38
+ // it('${should}', () => {
39
+ // expect(1).to.equal(1)
40
+ // })
41
+ // })`
42
+ // )
43
+ // await new Promise<void>(resolve => setTimeout(resolve, 1000))
44
+ // outBuffer.should.include(testFileName)
45
+ // outBuffer.should.include(thing)
46
+ // outBuffer.should.include(should)
47
+ // outBuffer.should.include(figures.tick)
48
+ // })
49
+ // mochaIt('should run a test when a new test file is changed', async function () {
50
+ // const config = structuredClone(baseConfig)
51
+ // // ignore the file from the last test, causing load errors
52
+ // config.testsIgnore = '**/c.test.js'
53
+ // // create a custom out function to capture the output
54
+ // let outBuffer = ''
55
+ // const customOut = (...texts: unknown[]): void => {
56
+ // outBuffer += texts.join(' ') + '\n'
57
+ // }
58
+ // const testFileName = `${tempFolder}/b.test.js`
59
+ // const thing = 'Sample test 2'
60
+ // const should = '2 should equal 2'
61
+ // if (existsSync(testFileName)) {
62
+ // await fs.unlink(testFileName)
63
+ // }
64
+ // existsSync(testFileName).should.equal(false)
65
+ // await watchFilesAndRunTestsChokidar(config, [], {}, [], makeRunManagerState(), customOut)
66
+ // outBuffer.should.equal('')
67
+ // void fs.writeFile(
68
+ // testFileName,
69
+ // `import { describe } from '../../dist/index.js'
70
+ // import { expect, should } from 'chai'
71
+ // should()
72
+ // describe('${thing}', ({it}) => {
73
+ // it('${should}', () => {
74
+ // expect(2).to.equal(2)
75
+ // })
76
+ // })`
77
+ // )
78
+ // await new Promise<void>(resolve => setTimeout(resolve, 1000))
79
+ // outBuffer.should.include(testFileName)
80
+ // outBuffer.should.include(thing)
81
+ // outBuffer.should.include(should)
82
+ // outBuffer.should.include(figures.tick)
83
+ // })
84
+ // mochaIt('removes a test from tests and dependencyTrees when it is deleted', async function () {
85
+ // const config = structuredClone(baseConfig)
86
+ // // create a custom out function to capture the output
87
+ // let outBuffer = ''
88
+ // const customOut = (...texts: unknown[]): void => {
89
+ // outBuffer += texts.join(' ') + '\n'
90
+ // }
91
+ // const testFileName = `${tempFolder}/c.test.js`
92
+ // const thing = 'Sample test 3'
93
+ // const should = '3 should equal 3'
94
+ // if (!existsSync(testFileName)) {
95
+ // await fs.writeFile(
96
+ // testFileName,
97
+ // `import { describe } from '../../dist/index.js'
98
+ // import { expect, should } from 'chai'
99
+ // should()
100
+ // describe('${thing}', ({it}) => {
101
+ // it('${should}', () => {
102
+ // expect(3).to.equal(3)
103
+ // })
104
+ // })`
105
+ // )
106
+ // }
107
+ // existsSync(testFileName).should.be.true
108
+ // const originalTests = [testFileName]
109
+ // const originalDependencyTrees: DependencyTrees = {
110
+ // [testFileName]: [
111
+ // 'dep-1.js',
112
+ // 'dep-2.js'
113
+ // ]
114
+ // }
115
+ // const tests = structuredClone(originalTests)
116
+ // const dependencyTrees = structuredClone(originalDependencyTrees)
117
+ // tests.should.include.members([testFileName])
118
+ // dependencyTrees.should.include.keys([testFileName])
119
+ // await watchFilesAndRunTestsChokidar(config, tests, dependencyTrees, [], makeRunManagerState(), customOut)
120
+ // await fs.unlink(testFileName)
121
+ // await new Promise<void>(resolve => setTimeout(resolve, 1000))
122
+ // tests.should.not.include.members([testFileName])
123
+ // dependencyTrees.should.not.include.keys([testFileName])
124
+ // })
125
+ // })
123
126
  //# sourceMappingURL=watchFilesAndRunTestsChokidar.unitTest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"watchFilesAndRunTestsChokidar.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesAndRunTestsChokidar.unitTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/C,OAAO,OAAO,MAAM,2BAA2B,CAAA;AAE/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAA;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAG9D,aAAa,CAAC,0CAA0C,EAAE;IACtD,MAAM,UAAU,GAAG,0CAA0C,CAAA;IAE7D,MAAM,UAAU,GAAG,mBAAmB,CAAC;QACnC,SAAS,EAAE,UAAU;QACrB,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE;YACH,cAAc,EAAE,UAAU;YAC1B,UAAU,EAAE,SAAS;SACxB;KACJ,CAAC,CAAA;IAEF,OAAO,CAAC,+CAA+C,EAAE,KAAK;QAC1D,MAAM,MAAM,GAAG,eAAe,CAAC,UAAU,CAAC,CAAA;QAC1C,0DAA0D;QAC1D,MAAM,CAAC,WAAW,GAAG,cAAc,CAAA;QAEnC,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;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":3,"file":"watchFilesAndRunTestsChokidar.unitTest.js","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesAndRunTestsChokidar.unitTest.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,kDAAkD;;AAElD,qFAAqF;AACrF,iEAAiE;AACjE,wDAAwD;AACxD,+DAA+D;AAE/D,0EAA0E;AAC1E,oEAAoE;AAEpE,+CAA+C;AAC/C,iCAAiC;AACjC,iCAAiC;AACjC,mBAAmB;AACnB,0CAA0C;AAC1C,oCAAoC;AACpC,YAAY;AACZ,SAAS;AAET,mFAAmF;AACnF,qDAAqD;AACrD,qEAAqE;AACrE,8CAA8C;AAE9C,gEAAgE;AAChE,6BAA6B;AAC7B,6DAA6D;AAC7D,kDAAkD;AAClD,YAAY;AAEZ,oFAAoF;AACpF,wCAAwC;AACxC,4CAA4C;AAE5C,oGAAoG;AAEpG,qCAAqC;AAErC,6BAA6B;AAC7B,4BAA4B;AAC5B,8DAA8D;AAC9D,wCAAwC;AACxC,WAAW;AAEX,mCAAmC;AAEnC,8BAA8B;AAC9B,gCAAgC;AAChC,SAAS;AAET,MAAM;AACN,YAAY;AAEZ,wEAAwE;AAExE,iDAAiD;AACjD,0CAA0C;AAC1C,2CAA2C;AAC3C,iDAAiD;AACjD,SAAS;AAET,uFAAuF;AACvF,qDAAqD;AACrD,qEAAqE;AACrE,8CAA8C;AAE9C,gEAAgE;AAChE,6BAA6B;AAC7B,6DAA6D;AAC7D,kDAAkD;AAClD,YAAY;AAEZ,yDAAyD;AACzD,wCAAwC;AACxC,4CAA4C;AAE5C,0CAA0C;AAC1C,4CAA4C;AAC5C,YAAY;AAEZ,uDAAuD;AAEvD,oGAAoG;AAEpG,qCAAqC;AAErC,6BAA6B;AAC7B,4BAA4B;AAC5B,8DAA8D;AAC9D,wCAAwC;AACxC,WAAW;AAEX,mCAAmC;AAEnC,8BAA8B;AAC9B,gCAAgC;AAChC,SAAS;AAET,MAAM;AACN,YAAY;AAEZ,wEAAwE;AAExE,iDAAiD;AACjD,0CAA0C;AAC1C,2CAA2C;AAC3C,iDAAiD;AACjD,SAAS;AAET,sGAAsG;AACtG,qDAAqD;AAErD,gEAAgE;AAChE,6BAA6B;AAC7B,6DAA6D;AAC7D,kDAAkD;AAClD,YAAY;AAEZ,yDAAyD;AACzD,wCAAwC;AACxC,4CAA4C;AAE5C,2CAA2C;AAC3C,kCAAkC;AAClC,gCAAgC;AAChC,kEAAkE;AAClE,wCAAwC;AACxC,WAAW;AAEX,mCAAmC;AAEnC,8BAA8B;AAC9B,gCAAgC;AAChC,SAAS;AAET,MAAM;AACN,gBAAgB;AAChB,YAAY;AAEZ,kDAAkD;AAElD,+CAA+C;AAC/C,6DAA6D;AAC7D,gCAAgC;AAChC,8BAA8B;AAC9B,6BAA6B;AAC7B,gBAAgB;AAChB,YAAY;AAEZ,uDAAuD;AACvD,2EAA2E;AAE3E,uDAAuD;AACvD,8DAA8D;AAE9D,oHAAoH;AAEpH,wCAAwC;AAExC,wEAAwE;AAExE,2DAA2D;AAC3D,kEAAkE;AAClE,SAAS;AACT,KAAK"}
@@ -1,3 +1,4 @@
1
- import type { FinalConfig, DependencyTrees, OutFn, TestExecutionFilters, WatchRunState } from '../../types.js';
2
- export declare function watchFilesAndRunTestsNodeWatch(config: FinalConfig, testFiles: string[], dependencyTrees: DependencyTrees, failingTests: string[], watchRunState?: WatchRunState, customOut?: OutFn, testFilesFilter?: string, executionFilters?: TestExecutionFilters): Promise<void>;
1
+ import type { FinalConfig, DependencyTrees, OutFn, TestExecutionFilters } from '../../types.js';
2
+ import { ReRunManager } from './reRunManager.js';
3
+ export declare function watchFilesAndRunTestsNodeWatch(config: FinalConfig, dependencyTrees: DependencyTrees, failingTests: string[], reRunManager: ReRunManager, customOut?: OutFn, executionFilters?: TestExecutionFilters): Promise<void>;
3
4
  //# sourceMappingURL=watchFilesAndRunTestsNodeWatch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"watchFilesAndRunTestsNodeWatch.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesAndRunTestsNodeWatch.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAI9G,wBAAsB,8BAA8B,CAChD,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,EAAE,EACnB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,MAAM,EAAE,EACtB,aAAa,CAAC,EAAE,aAAa,EAC7B,SAAS,CAAC,EAAE,KAAK,EACjB,eAAe,CAAC,EAAE,MAAM,EACxB,gBAAgB,GAAE,oBAAyB,GAC5C,OAAO,CAAC,IAAI,CAAC,CA4If"}
1
+ {"version":3,"file":"watchFilesAndRunTestsNodeWatch.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/watchFilesAndRunTestsNodeWatch.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAE/F,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKhD,wBAAsB,8BAA8B,CAChD,MAAM,EAAE,WAAW,EAEnB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,YAAY,EAE1B,SAAS,CAAC,EAAE,KAAK,EACjB,gBAAgB,GAAE,oBAAyB,GAC5C,OAAO,CAAC,IAAI,CAAC,CA8Jf"}