@lumjs/tests 1.7.1 → 1.8.1
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 +9 -1
- package/lib/index.js +6 -4
- package/lib/test/stats.js +3 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,12 @@ 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
|
+
|
|
14
20
|
## [1.7.1] - 2022-10-18
|
|
15
21
|
### Changed
|
|
16
22
|
- Bumped `@lumjs/core` to `1.7.1`.
|
|
@@ -134,7 +140,9 @@ and a reference to a property of a module will be in `@tests.propName` format.
|
|
|
134
140
|
- Ported from Lum.js v4 library set.
|
|
135
141
|
- Added a few more features from the PHP version.
|
|
136
142
|
|
|
137
|
-
[Unreleased]: https://github.com/supernovus/lum.tests.js/compare/v1.
|
|
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
|
|
138
146
|
[1.7.0]: https://github.com/supernovus/lum.tests.js/compare/v1.6.0...v1.7.0
|
|
139
147
|
[1.6.0]: https://github.com/supernovus/lum.tests.js/compare/v1.5.0...v1.6.0
|
|
140
148
|
[1.5.0]: https://github.com/supernovus/lum.tests.js/compare/v1.4.0...v1.5.0
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Several test related classes.
|
|
3
3
|
* @module @lumjs/tests
|
|
4
4
|
*/
|
|
5
|
-
const {
|
|
5
|
+
const {def,lazy} = require('@lumjs/core/types');
|
|
6
|
+
|
|
7
|
+
const E = def.e;
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* The main Test class
|
|
@@ -11,7 +13,7 @@ const {has,can} = require('@lumjs/core').buildModule(module);
|
|
|
11
13
|
* @class
|
|
12
14
|
* @see module:@lumjs/tests/test
|
|
13
15
|
*/
|
|
14
|
-
|
|
16
|
+
def(exports, 'Test', require('./test'), E);
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* Test Harness class (lazy loaded)
|
|
@@ -20,7 +22,7 @@ has('Test', true);
|
|
|
20
22
|
* @class
|
|
21
23
|
* @see module:@lumjs/tests/harness
|
|
22
24
|
*/
|
|
23
|
-
|
|
25
|
+
lazy(exports, 'Harness', () => require('./harness'), E);
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
* Functional API registration (lazy loaded)
|
|
@@ -29,7 +31,7 @@ can('Harness', true);
|
|
|
29
31
|
* @function
|
|
30
32
|
* @see module:@lumjs/tests/test/functional
|
|
31
33
|
*/
|
|
32
|
-
|
|
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
|
|
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 =
|
|
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.
|
|
3
|
+
"version": "1.8.1",
|
|
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,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies":
|
|
26
26
|
{
|
|
27
|
-
"@lumjs/core": "^1.
|
|
27
|
+
"@lumjs/core": "^1.8.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"test": "
|
|
30
|
+
"test": "lumtest.js",
|
|
31
31
|
"build-docs": "jsdoc -c ./jsdoc.json",
|
|
32
32
|
"build": "npm run build:grammar",
|
|
33
33
|
"build:grammar": "./bin/build-grammar.sh tap"
|