@lumjs/tests 1.8.2 → 1.9.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 +11 -1
- package/lib/harness/index.js +5 -5
- package/lib/test/stats.js +3 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,15 @@ and a reference to a property of a module will be in `@tests.propName` format.
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [1.9.0] - 2024-07-27
|
|
15
|
+
### Changed
|
|
16
|
+
- Renamed `Harness` constructor name to `LumTestsHarness` to be more unique.
|
|
17
|
+
- The `Stats` class no longer requires the `../harness` module, but instead
|
|
18
|
+
checks if the object instance's constructor name is `LumTestsHarness`.
|
|
19
|
+
This will allow the `test` and `test/functional` modules to be bundled
|
|
20
|
+
by Webpack without bundling `harness` which currently has some issues.
|
|
21
|
+
- Minor bug fixes from `1.8.1` and `1.8.2` unlisted releases.
|
|
22
|
+
|
|
14
23
|
## [1.8.0] - 2023-01-06
|
|
15
24
|
### Changed
|
|
16
25
|
- Bumped `@lumjs/core` to `1.8.0`.
|
|
@@ -140,7 +149,8 @@ and a reference to a property of a module will be in `@tests.propName` format.
|
|
|
140
149
|
- Ported from Lum.js v4 library set.
|
|
141
150
|
- Added a few more features from the PHP version.
|
|
142
151
|
|
|
143
|
-
[Unreleased]: https://github.com/supernovus/lum.tests.js/compare/v1.
|
|
152
|
+
[Unreleased]: https://github.com/supernovus/lum.tests.js/compare/v1.9.0...HEAD
|
|
153
|
+
[1.9.0]: https://github.com/supernovus/lum.tests.js/compare/v1.8.0...v1.9.0
|
|
144
154
|
[1.8.0]: https://github.com/supernovus/lum.tests.js/compare/v1.7.1...v1.8.0
|
|
145
155
|
[1.7.1]: https://github.com/supernovus/lum.tests.js/compare/v1.7.0...v1.7.1
|
|
146
156
|
[1.7.0]: https://github.com/supernovus/lum.tests.js/compare/v1.6.0...v1.7.0
|
package/lib/harness/index.js
CHANGED
|
@@ -33,7 +33,7 @@ const Plugin = require('./plugin');
|
|
|
33
33
|
*
|
|
34
34
|
* @exports module:@lumjs/tests/harness
|
|
35
35
|
*/
|
|
36
|
-
class
|
|
36
|
+
class LumTestsHarness
|
|
37
37
|
{
|
|
38
38
|
/**
|
|
39
39
|
* Build a new Harness
|
|
@@ -248,12 +248,12 @@ class Harness
|
|
|
248
248
|
|
|
249
249
|
} // Harness class
|
|
250
250
|
|
|
251
|
-
def(
|
|
252
|
-
def(
|
|
253
|
-
def(
|
|
251
|
+
def(LumTestsHarness, 'Plugin', Plugin);
|
|
252
|
+
def(LumTestsHarness, 'QueuedTest', QueuedTest);
|
|
253
|
+
def(LumTestsHarness, 'Errors', require('./errors'));
|
|
254
254
|
|
|
255
255
|
// Export it.
|
|
256
|
-
module.exports =
|
|
256
|
+
module.exports = LumTestsHarness;
|
|
257
257
|
|
|
258
258
|
// Some classes required at end for recursive sanity reasons.
|
|
259
259
|
|
package/lib/test/stats.js
CHANGED
|
@@ -100,8 +100,9 @@ class Stats
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
if (!this.isTop)
|
|
103
|
-
{ // Try to find a Harness instance
|
|
104
|
-
if (isObj(require.main) && require.main.exports
|
|
103
|
+
{ // Try to find a possible Harness instance using some obscure logic...
|
|
104
|
+
if (isObj(require.main) && isObj(require.main.exports)
|
|
105
|
+
&& require.main.exports.constructor.name === 'LumTestsHarness')
|
|
105
106
|
{ // We found the Harness instance.
|
|
106
107
|
this.harness = require.main.exports;
|
|
107
108
|
}
|
|
@@ -380,7 +381,3 @@ class Stats
|
|
|
380
381
|
|
|
381
382
|
// Export the class
|
|
382
383
|
module.exports = Stats;
|
|
383
|
-
|
|
384
|
-
// Finally at the bottom after `module.exports` has been set, we will load
|
|
385
|
-
// the Harness class to avoid circular references failing.
|
|
386
|
-
const Harness = require('../harness');
|