@lumjs/tests 1.4.0 → 1.5.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
@@ -6,8 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.5.0] - 2022-08-30
10
+ ### Added
11
+ - Sample `data` used in some of the old tests.
12
+ ### Fixed
13
+ - Mistakes in the changelog.
14
+
9
15
  ## [1.4.0] - 2022-07-29
10
- ## Added
16
+ ### Added
17
+ - Configuration for JSDoc.
18
+ - A few module-level *docblocks*.
11
19
  - Explicit `exports` section in `package.json` file.
12
20
  - Added `test.done()` method to be used instead of `test.output()`.
13
21
  - Added ability to configure the stringify depth.
@@ -19,17 +27,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
27
  - Added `callIs()` method that is like `call()` but takes a desired value and passes the function return value to `cmp()`, `isa()`, or other test methods.
20
28
  - A new `test.ran` computed property.
21
29
 
22
- ## Changed
23
- - Enhanced a lot of docblocks.
24
- - Updated anything using `types.stringify()` to support the depth setting.
25
- - Updated `run()` so it can use either `call()` or `callIs()` as the underlying test method when using a custom `function` test.
26
-
27
- ### Added
28
- - Configuration for JSDoc.
29
- - A few module-level *docblocks*.
30
30
  ### Changed
31
31
  - Updated `@lumjs/core` dependency to `^1.0.0` (no more *beta* tags!)
32
32
  - Updated various *docblocks* for documentation.
33
+ - Enhanced a lot of docblocks.
34
+ - Updated anything using `types.stringify()` to support the depth setting.
35
+ - Updated `run()` so it can use either `call()` or `callIs()` as the underlying test method when using a custom `function` test.
33
36
 
34
37
  ## [1.3.0] - 2022-07-27
35
38
  ### Added
@@ -82,7 +85,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
82
85
  - Ported from Lum.js v4 library set.
83
86
  - Added a few more features from the PHP version.
84
87
 
85
- [Unreleased]: https://github.com/supernovus/lum.tests.js/compare/v1.4.0...HEAD
88
+ [Unreleased]: https://github.com/supernovus/lum.tests.js/compare/v1.5.0...HEAD
89
+ [1.5.0]: https://github.com/supernovus/lum.tests.js/compare/v1.4.0...v1.5.0
86
90
  [1.4.0]: https://github.com/supernovus/lum.tests.js/compare/v1.3.0...v1.4.0
87
91
  [1.3.0]: https://github.com/supernovus/lum.tests.js/compare/v1.2.0...v1.3.0
88
92
  [1.2.0]: https://github.com/supernovus/lum.tests.js/compare/v1.1.1...v1.2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumjs/tests",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "main": "lib/index.js",
5
5
  "exports":
6
6
  {
@@ -8,7 +8,8 @@
8
8
  "./test": "./lib/test.js",
9
9
  "./functional": "./lib/functional.js",
10
10
  "./harness": "./lib/harness.js",
11
- "./package.json": "./package.json"
11
+ "./package.json": "./package.json",
12
+ "./data/*": "./test/data/*.js"
12
13
  },
13
14
  "license": "MIT",
14
15
  "repository":
@@ -0,0 +1,58 @@
1
+ module.exports = function (opts={})
2
+ {
3
+ let people =
4
+ [
5
+ {
6
+ name: 'Bob',
7
+ age: 40,
8
+ },
9
+ {
10
+ name: 'Lisa',
11
+ age: 25,
12
+ },
13
+ {
14
+ name: 'Kevin',
15
+ age: 18,
16
+ },
17
+ {
18
+ name: 'Sarah',
19
+ age: 13,
20
+ },
21
+ ];
22
+
23
+ if (opts.withRecursion)
24
+ {
25
+ people[0].kids = [people[2],people[3]];
26
+ people[1].kids = [people[3]];
27
+ people[2].kids = [];
28
+ people[3].kids = [];
29
+ people[0].parents = [];
30
+ people[1].parents = [];
31
+ people[2].parents = [people[0]];
32
+ people[3].parents = [people[0],people[1]];
33
+ }
34
+ else if (opts.withReferences)
35
+ {
36
+ people[0].kids = [2,3];
37
+ people[1].kids = [3];
38
+ people[2].kids = [];
39
+ people[3].kids = [];
40
+ people[0].parents = [];
41
+ people[1].parents = [];
42
+ people[2].parents = [0];
43
+ people[3].parents = [0,1];
44
+ }
45
+ else if (opts.withNames)
46
+ {
47
+ people[0].kids = [people[2].name,people[3].name];
48
+ people[1].kids = [people[3].name];
49
+ people[2].kids = [];
50
+ people[3].kids = [];
51
+ people[0].parents = [];
52
+ people[1].parents = [];
53
+ people[2].parents = [people[0].name];
54
+ people[3].parents = [people[0].name,people[1].name];
55
+ }
56
+
57
+ return people;
58
+ }