risei 3.3.2 → 3.3.3

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Overview
5
5
 
6
- Risei is a new way to write unit tests that's easier and faster, more dependable, and keeps your tests from standing in the way of redesigns.
6
+ Risei is a new way to write unit tests that's easier, faster, and more readable.  Tests made with Risei aren't a source of errors or a drag on redesigns.
7
7
 
8
8
  Risei does all this by replacing hand-coded tests with simple declarative syntax.
9
9
 
@@ -40,16 +40,15 @@ And they have a summary bar at the bottom:
40
40
 
41
41
  ![https://deusware.com/risei/images/Summary-example.png](https://deusware.com/risei/images/Summary-example.png)
42
42
 
43
- - This bar is red when any tests fail, much as you'd expect.
43
+ - This bar is red when any tests fail, just as you'd expect.
44
44
 
45
45
 
46
46
 
47
47
  ## Status
48
48
 
49
- Risei's major features are now complete, but new enhancements or fixes may appear from time to time. \
50
- The latest release, **3.3.2**, adds `async` capabilities formerly missing from the `.from` feature.
49
+ Risei's major features are now complete, but new enhancements or fixes may appear from time to time.
51
50
 
52
- Check out the [full list of changes](#version-history).
51
+ The latest release, **3.3.3**, adds `async` capabilities to poly-testing, the last place they were missing.
53
52
 
54
53
 
55
54
 
@@ -123,7 +122,7 @@ tests = [ ...
123
122
  ```
124
123
 
125
124
  - **Asynchronous / awaitable code can tested with no changes at all to this syntax.**
126
- - And you use `async` and `await` normally if you define functions within tests.
125
+ - You use `async` and `await` normally if you define functions within tests.
127
126
  - Use empty arrays for `.in` or `.with` when there are no args to pass.
128
127
  - You can use [long names](https://deusware.com/risei/index.html#long-names) for properties if you want.
129
128
 
@@ -218,56 +217,6 @@ If errors are thrown while testing, gold bars listing them appear at the bottom,
218
217
 
219
218
 
220
219
 
221
- ## Version history
222
-
223
- - Release **3.3.2** (September, 2025) contains this change:
224
- - You can now use asynchronous / awaitable code in `.from` using `async` and `await` normally.
225
- - You already could use awaitable code with the normal syntax in `.plus`, `.do`, and `.undo`.
226
-
227
-
228
- - Release **3.3.1** (February, 2025) contains this change:
229
- - You can now spoof and otherwise address value properties (formally _data descriptors_) that don't have an initial value, whether they are static or instance class members.
230
-
231
-
232
- - Release **3.3.0** (January, 2025) adds this change to those of other recent releases:
233
- - You can now test instance members with the same names as static members using a new `.and` option of `"instance"`.
234
-
235
-
236
-
237
- <details>
238
- <summary>
239
- Older releases
240
- </summary>
241
-
242
- - Release **3.2.1** (January, 2025) contains all the changes from **3.2.0**, **3.1.1**, and **3.1.0**, plus this change:
243
- - Risei's mistaken nominal dependency on **npm** has been removed.
244
-
245
-
246
- - Release **3.2.0** (January, 2025) contains all the changes from **3.1.1** and **3.1.0**, plus this change:
247
- - Risei's self-dependency for its own self-testing has been moved back to the development-only scope.
248
-
249
-
250
- - Release **3.1.1** (January, 2025) contains these changes:
251
- - Extra commas and non-objects in arrays of test objects are disregarded, and no longer cause a throw.
252
- - Throws in wider scopes are now listed at the end, like others already found there.
253
-
254
-
255
- - Release **3.1.0** (January, 2025) contains these changes:
256
- - Accessor properties (formally _accessor descriptors_) are now compared for test results and displayed in test outputs.
257
- - Any accessor properties that throw errors during display are displayed as `(threw)`.
258
- - Throws in tested code and in test framing code are now listed at the end, and also displayed amid the tests.
259
- - `File` objects now have a succinct custom display in outputs.
260
- - **(Breaking change)**&nbsp; In `constructor` tests, constructed instances are available in `.from` functions only as `actual` / `test.actual`.
261
- - **(Breaking change)**&nbsp; In `constructor` tests, `test.target` is now the `prototype` of the tested class.
262
- - Widespread internal reengineering of other kinds.
263
-
264
-
265
- > Older releases are dropped from this list progressively over time.&nbsp; Using the latest release is recommended.
266
-
267
- </details>
268
-
269
-
270
-
271
220
  ## Known issues and workarounds
272
221
 
273
222
  There are the known minor issues:
@@ -277,10 +226,10 @@ There are the known minor issues:
277
226
 
278
227
 
279
228
  - Spoofing accessor properties only works when they have both a getter and a setter.
280
- - The workaround is to find another way to produce the property values you need.
229
+ - There is no specific workaround for this, but you may look for other ways to produce the property values you need.
281
230
 
282
231
 
283
- - Predefined JavaScript methods like `toString()` may not be recognized, nor any instance method that has the same name as a static method.
232
+ - Custom versions of JavaScript methods like `toString()` may not be recognized, nor any instance methods with the same names as static methods.
284
233
  - The workaround is to use an `.and` value of `"instance"` for any methods like these that you test.
285
234
 
286
235
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "risei",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "description": "Risei allows you to write unit tests as simple JavaScript objects, so it's easy and fast, with no drag on redesign.",
5
5
  "keywords": [
6
6
  "unit test",
@@ -54,6 +54,6 @@
54
54
  "fs": "^0.0.1-security",
55
55
  "mocha": "^10.0.0",
56
56
  "morgan": "~1.9.1",
57
- "risei": "^3.3.1"
57
+ "risei": "^3.3.2"
58
58
  }
59
59
  }
@@ -66,11 +66,11 @@ export default class TestTargets {
66
66
  // region Dependencies of targeting / naming methods
67
67
 
68
68
  supplyPolyMethodNonce(test, callable) /* verified */ {
69
- let nonce = (...inputs) => {
69
+ let nonce = async (...inputs) => {
70
70
  let actuals = [];
71
71
 
72
72
  for (let args of inputs) {
73
- let local = test.target[callable](...args);
73
+ let local = await test.target[callable](...args);
74
74
  actuals.push(local);
75
75
  }
76
76