sxy-test-runner 1.0.13 → 1.0.15

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 (78) hide show
  1. package/dist/cli/index.js +2 -6
  2. package/dist/cli/init.js +19 -14
  3. package/dist/cli/lib/addBasePath.js +0 -1
  4. package/dist/cli/lib/addBasePath.unitTest.js +3 -1
  5. package/dist/cli/lib/addExports.unitTest.js +4 -1
  6. package/dist/cli/lib/applyConfigDefaults.js +12 -7
  7. package/dist/cli/lib/applyConfigDefaults.unitTest.js +9 -3
  8. package/dist/cli/lib/buildDependencyTree.js +10 -5
  9. package/dist/cli/lib/buildDependencyTree.unitTest.js +3 -1
  10. package/dist/cli/lib/buildDependencyTrees.js +6 -4
  11. package/dist/cli/lib/buildDependencyTrees.unitTest.js +3 -1
  12. package/dist/cli/lib/defaultConfig.test.js +3 -1
  13. package/dist/cli/lib/doUserSetup.js +0 -3
  14. package/dist/cli/lib/doUserSetup.unitTest.js +3 -1
  15. package/dist/cli/lib/doUserTeardown.js +0 -3
  16. package/dist/cli/lib/doUserTeardown.unitTest.js +3 -1
  17. package/dist/cli/lib/findTestFiles.unitTest.js +3 -1
  18. package/dist/cli/lib/getAllowedFlags.js +0 -2
  19. package/dist/cli/lib/getAllowedFlags.unitTest.js +3 -1
  20. package/dist/cli/lib/injectProperties.js +2 -2
  21. package/dist/cli/lib/injectProperties.unitTest.js +9 -2
  22. package/dist/cli/lib/loadConfig.js +2 -2
  23. package/dist/cli/lib/loadConfig.unitTest.js +3 -2
  24. package/dist/cli/lib/loadTestFile.js +17 -15
  25. package/dist/cli/lib/loadTestFile.unitTest.js +8 -3
  26. package/dist/cli/lib/loadTestFileStatic.js +1 -0
  27. package/dist/cli/lib/loadTestFileStatic.unitTest.js +1 -0
  28. package/dist/cli/lib/parseCommandLineArguments.js +1 -9
  29. package/dist/cli/lib/parseCommandLineArguments.unitTest.js +6 -2
  30. package/dist/cli/lib/parseDescribe.js +12 -18
  31. package/dist/cli/lib/parseDescribe.unitTest.js +6 -2
  32. package/dist/cli/lib/processWatchEvent.unitTest.js +9 -1
  33. package/dist/cli/lib/reservedExportKeys.unitTest.js +3 -1
  34. package/dist/cli/lib/runDescribe.js +4 -7
  35. package/dist/cli/lib/runDescribe.old.js +19 -25
  36. package/dist/cli/lib/runDescribe.unitTest.js +120 -2
  37. package/dist/cli/lib/runDescribeRun.js +3 -7
  38. package/dist/cli/lib/runDescribeRun.unitTest.js +125 -4
  39. package/dist/cli/lib/runIt.js +16 -18
  40. package/dist/cli/lib/runIt.unitTest.js +124 -4
  41. package/dist/cli/lib/runTasks.js +2 -7
  42. package/dist/cli/lib/runTasks.unitTest.js +3 -1
  43. package/dist/cli/lib/runTest-old.js +1 -0
  44. package/dist/cli/lib/runTest-old.unitTest.js +1 -0
  45. package/dist/cli/lib/runTest.js +15 -12
  46. package/dist/cli/lib/runTest.unitTest.js +38 -11
  47. package/dist/cli/lib/runTests.js +36 -35
  48. package/dist/cli/lib/runTests.unitTest.js +15 -8
  49. package/dist/cli/lib/showTestLoadingError.js +6 -6
  50. package/dist/cli/lib/showTestLoadingError.unitTest.js +5 -3
  51. package/dist/cli/lib/showTestResult.js +10 -16
  52. package/dist/cli/lib/showTestResult.unitTest.js +26 -17
  53. package/dist/cli/lib/validateConfig.js +0 -5
  54. package/dist/cli/lib/validateConfig.unitTest.js +2 -3
  55. package/dist/cli/lib/watchFiles.unitTest.js +5 -3
  56. package/dist/cli/lib/watchFilesAndRunTests.js +3 -1
  57. package/dist/cli/lib/watchFilesAndRunTests.unitTest.js +18 -15
  58. package/dist/cli/lib/watchFilesAndRunTestsChokidar.js +22 -29
  59. package/dist/cli/lib/watchFilesAndRunTestsChokidar.unitTest.js +19 -17
  60. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.js +28 -31
  61. package/dist/cli/lib/watchFilesAndRunTestsNodeWatch.unitTest.js +21 -16
  62. package/dist/cli/lib/watchFilesChokidar.js +15 -11
  63. package/dist/cli/lib/watchFilesChokidar.unitTest.js +11 -8
  64. package/dist/cli/lib/watchFilesNodeWatch.js +9 -6
  65. package/dist/cli/lib/watchFilesNodeWatch.unitTest.js +6 -3
  66. package/dist/cli/once.js +0 -6
  67. package/dist/cli/watch.js +18 -14
  68. package/dist/cli/watch.unitTest.js +16 -16
  69. package/dist/describe-old.js +35 -20
  70. package/dist/describe-old.unitTest.js +10 -1
  71. package/dist/describe.js +8 -3
  72. package/dist/describe.unitTest.js +5 -2
  73. package/dist/indexNumberToLetters.js +1 -3
  74. package/dist/output.js +7 -0
  75. package/dist/testsState.js +2 -1
  76. package/package.json +14 -7
  77. package/readme.md +1 -1
  78. package/sxy-loader.config.js +10 -10
package/dist/output.js CHANGED
@@ -1,17 +1,24 @@
1
1
  /* eslint-disable no-console */
2
+
2
3
  import { debugging } from './config.js';
4
+ async function waitToOutput() {}
3
5
  export async function out(...texts) {
6
+ await waitToOutput();
4
7
  await console.log(...texts);
5
8
  }
6
9
  export async function warn(...texts) {
10
+ await waitToOutput();
7
11
  await console.log(...texts);
8
12
  }
9
13
  export async function error(...texts) {
14
+ await waitToOutput();
10
15
  await console.log(...texts);
11
16
  }
12
17
  export async function log(...texts) {
18
+ await waitToOutput();
13
19
  await console.log(...texts);
14
20
  }
15
21
  export const debug = debugging ? async function debug(...texts) {
22
+ await waitToOutput();
16
23
  await console.log(...texts);
17
24
  } : async function () {};
@@ -1,4 +1,5 @@
1
- export const testsState = {//describeCounter: 1,
1
+ export const testsState = {
2
+ //describeCounter: 1,
2
3
  //describeResults: [],
3
4
  //testResults: []
4
5
  };
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "sxy-test-runner",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "license": "UNLICENSED",
5
+ "homepage": "https://github.com/RobertSandiford/sxy-test-runner",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/RobertSandiford/sxy-test-runner"
9
+ },
5
10
  "type": "module",
6
11
  "main": "./dist/index.js",
7
12
  "module": "./dist/index.js",
@@ -40,7 +45,7 @@
40
45
  "mocha-trial": "mocha --watch --parallel --config unitTesting/.mocharc.cjs --watch-files dist,unitTesting dist/**/runTest.unitTest.js"
41
46
  },
42
47
  "dependencies": {
43
- "@babel/core": "^7.20.2",
48
+ "@babel/core": "^7.21.4",
44
49
  "chalk-extensions": "^1.0.1",
45
50
  "chokidar": "^3.5.3",
46
51
  "cross-env": "^7.0.3",
@@ -48,17 +53,19 @@
48
53
  "figures": "^4.0.1",
49
54
  "glob": "^7.2.3",
50
55
  "globby": "^12.2.0",
51
- "minimatch": "^5.1.0",
56
+ "minimatch": "^5.1.6",
52
57
  "node-watch": "^0.7.3",
53
58
  "slash": "^5.0.0",
54
59
  "sxy-dev-tools": "^1.0.6",
55
60
  "sxy-helpers": "^1.0.0",
56
- "sxy-loader": "^2.0.18",
57
- "sxy-standard": "^1.0.11",
61
+ "sxy-lib": "^1.0.12",
62
+ "sxy-lib-object-copy": "^1.0.5",
63
+ "sxy-loader": "^2.0.19",
64
+ "sxy-standard": "^1.0.12",
58
65
  "sxy-standard-object-copy": "^1.0.5"
59
66
  },
60
67
  "devDependencies": {
61
- "@babel/cli": "^7.19.3",
68
+ "@babel/cli": "^7.21.0",
62
69
  "babel-plugin-transform-awaitful": "^1.0.0",
63
70
  "chai": "^4.3.7",
64
71
  "chai-as-promised": "^7.1.1",
@@ -66,7 +73,7 @@
66
73
  "eslint-config-sandi": "^1.2.0",
67
74
  "mocha": "^9.2.2",
68
75
  "mocha-steps": "^1.3.0",
69
- "nodemon": "^2.0.20",
76
+ "nodemon": "^2.0.22",
70
77
  "sinon": "^12.0.1",
71
78
  "sinon-chai": "^3.7.0"
72
79
  }
package/readme.md CHANGED
@@ -203,4 +203,4 @@ describe('something', ({it, beforeEachTest, afterEachTest, afterDescribe}) => {
203
203
 
204
204
  # Known issues
205
205
 
206
- sxy-loader uses eval to load and re-load modules, and this makes a big mess of error output. I am hoping for a solution to module reloading in the official spec to solve this. It may be possible to switch to a different method of re-loading modules to solve this (no plans for this just now).
206
+ sxy-loader effectively uses eval to run modules, to get around the ESM limited of being unable to reload modules. This has a harmful effect on error reporting when code hits errors. I have some plans to work on error reporting, or work to get changes made to the ESM spec, but at current time error reporting isn't great.
@@ -1,10 +1,10 @@
1
-
2
- export default {
3
- //returnStyle: 'esm-dynamic', // 'esm-dynamic' | 'esm-static'
4
- mode: process.env.NODE_ENV, // 'development' | 'production' environment
5
- //transformCaching: 'content', // content | hash | false // default content
6
- //transformCacheStorage: 'file', // 'file' | 'memory'
7
- //transformCacheStorageLocation: '__cache', // null | path/to/location/from/project/dir
8
- quiet: true, // disable info output
9
- debug: false, // debugging output // doesn't work yet
10
- }
1
+
2
+ export default {
3
+ //returnStyle: 'esm-dynamic', // 'esm-dynamic' | 'esm-static'
4
+ mode: process.env.NODE_ENV, // 'development' | 'production' environment
5
+ //transformCaching: 'content', // content | hash | false // default content
6
+ //transformCacheStorage: 'file', // 'file' | 'memory'
7
+ //transformCacheStorageLocation: '__cache', // null | path/to/location/from/project/dir
8
+ quiet: true, // disable info output
9
+ debug: false, // debugging output // doesn't work yet
10
+ }