@lumjs/tests 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,6 +11,17 @@ and a reference to a property of a module will be in `@tests.propName` format.
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [1.8.0] - 2023-01-06
15
+ ### Changed
16
+ - Bumped `@lumjs/core` to `1.8.0`.
17
+ - Moved away from `ModuleBuilder` which I've discontinued.
18
+ - Changed how `@lumjs/core/modules` is loaded due to upstream changes.
19
+
20
+ ## [1.7.1] - 2022-10-18
21
+ ### Changed
22
+ - Bumped `@lumjs/core` to `1.7.1`.
23
+ - Moved from custom lazy-loading to `ModuleBuilder`.
24
+
14
25
  ## [1.7.0] - 2022-09-29
15
26
  #### The *harness* update
16
27
  ### Added
@@ -129,7 +140,9 @@ and a reference to a property of a module will be in `@tests.propName` format.
129
140
  - Ported from Lum.js v4 library set.
130
141
  - Added a few more features from the PHP version.
131
142
 
132
- [Unreleased]: https://github.com/supernovus/lum.tests.js/compare/v1.7.0...HEAD
143
+ [Unreleased]: https://github.com/supernovus/lum.tests.js/compare/v1.8.0...HEAD
144
+ [1.8.0]: https://github.com/supernovus/lum.tests.js/compare/v1.7.1...v1.8.0
145
+ [1.7.1]: https://github.com/supernovus/lum.tests.js/compare/v1.7.0...v1.7.1
133
146
  [1.7.0]: https://github.com/supernovus/lum.tests.js/compare/v1.6.0...v1.7.0
134
147
  [1.6.0]: https://github.com/supernovus/lum.tests.js/compare/v1.5.0...v1.6.0
135
148
  [1.5.0]: https://github.com/supernovus/lum.tests.js/compare/v1.4.0...v1.5.0
package/lib/index.js CHANGED
@@ -2,16 +2,18 @@
2
2
  * Several test related classes.
3
3
  * @module @lumjs/tests
4
4
  */
5
- const {lazy} = require('@lumjs/core/types');
5
+ const {def,lazy} = require('@lumjs/core/types');
6
+
7
+ const E = def.e;
6
8
 
7
9
  /**
8
10
  * The main Test class
9
11
  *
12
+ * @name module:@lumjs/tests.Test
13
+ * @class
10
14
  * @see module:@lumjs/tests/test
11
15
  */
12
- exports.Test = require('./test');
13
-
14
- const lz = {enumerable: true};
16
+ def(exports, 'Test', require('./test'), E);
15
17
 
16
18
  /**
17
19
  * Test Harness class (lazy loaded)
@@ -20,7 +22,7 @@ const lz = {enumerable: true};
20
22
  * @class
21
23
  * @see module:@lumjs/tests/harness
22
24
  */
23
- lazy(exports, 'Harness', () => require('./harness'), lz);
25
+ lazy(exports, 'Harness', () => require('./harness'), E);
24
26
 
25
27
  /**
26
28
  * Functional API registration (lazy loaded)
@@ -29,7 +31,7 @@ lazy(exports, 'Harness', () => require('./harness'), lz);
29
31
  * @function
30
32
  * @see module:@lumjs/tests/test/functional
31
33
  */
32
- lazy(exports, 'functional', () => require('./test/functional'), lz);
34
+ lazy(exports, 'functional', () => require('./test/functional'), E);
33
35
 
34
36
  /**
35
37
  * Create a new Test instance.
package/lib/test/stats.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const core = require('@lumjs/core');
2
+ const mods = require('@lumjs/core/modules');
2
3
  const {types} = core;
3
4
  const {S,N,isObj,def} = types;
4
5
  const Log = require('./log');
@@ -28,7 +29,7 @@ class Stats
28
29
  * @param {object} [opts] Named options.
29
30
  * @param {string} [opts.id] A unique test id, used by Harness.
30
31
  * @param {number} [opts.plan] Passed to `plan()` method.
31
- * @param {object} [opts.moduleName] Options for `core.modules.name()`.
32
+ * @param {object} [opts.moduleName] Options for `core/modules.name()`.
32
33
  * @param {object} [opts.module] The node module to export this test to.
33
34
  *
34
35
  * If you use this option, `opts.module.exports` will be assigned
@@ -61,7 +62,7 @@ class Stats
61
62
  }
62
63
  else if (hasModule)
63
64
  { // We're going to generate a simple name.
64
- this.id = core.modules.name(opts.module, opts.moduleName);
65
+ this.id = mods.name(opts.module, opts.moduleName);
65
66
  }
66
67
  else
67
68
  { // An anonymous test.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@lumjs/tests",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "main": "lib/index.js",
5
5
  "bin":
6
6
  {
7
- "lumtest": "bin/lumtest.js"
7
+ "lumtest.js": "./bin/lumtest.js"
8
8
  },
9
9
  "exports":
10
10
  {
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies":
26
26
  {
27
- "@lumjs/core": "^1.5.1"
27
+ "@lumjs/core": "^1.8.0"
28
28
  },
29
29
  "scripts": {
30
30
  "test": "node ./bin/lumtest.js",