@augment-vir/test 31.9.1 → 31.9.2

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.
@@ -59,17 +59,26 @@ export type FunctionWithContextTestCase<FunctionToTest extends BaseFunctionWithC
59
59
  * itCases(myFunctionToTest, [
60
60
  * {
61
61
  * it: 'handles negative numbers',
62
- * inputs: [-1, -2],
62
+ * inputs: [
63
+ * -1,
64
+ * -2,
65
+ * ],
63
66
  * expect: -3,
64
67
  * },
65
68
  * {
66
69
  * it: 'handles 0',
67
- * inputs: [0, 0],
70
+ * inputs: [
71
+ * 0,
72
+ * 0,
73
+ * ],
68
74
  * expect: 0,
69
75
  * },
70
76
  * {
71
77
  * it: 'adds',
72
- * inputs: [3, 5],
78
+ * inputs: [
79
+ * 3,
80
+ * 5,
81
+ * ],
73
82
  * expect: 8,
74
83
  * },
75
84
  * ]);
@@ -100,17 +109,26 @@ export declare function itCasesWithContext<const FunctionToTest extends BaseFunc
100
109
  * itCases(myFunctionToTest, [
101
110
  * {
102
111
  * it: 'handles negative numbers',
103
- * inputs: [-1, -2],
112
+ * inputs: [
113
+ * -1,
114
+ * -2,
115
+ * ],
104
116
  * expect: -3,
105
117
  * },
106
118
  * {
107
119
  * it: 'handles 0',
108
- * inputs: [0, 0],
120
+ * inputs: [
121
+ * 0,
122
+ * 0,
123
+ * ],
109
124
  * expect: 0,
110
125
  * },
111
126
  * {
112
127
  * it: 'adds',
113
- * inputs: [3, 5],
128
+ * inputs: [
129
+ * 3,
130
+ * 5,
131
+ * ],
114
132
  * expect: 8,
115
133
  * },
116
134
  * ]);
@@ -23,17 +23,26 @@ const unsetError = Symbol('unset-error');
23
23
  * itCases(myFunctionToTest, [
24
24
  * {
25
25
  * it: 'handles negative numbers',
26
- * inputs: [-1, -2],
26
+ * inputs: [
27
+ * -1,
28
+ * -2,
29
+ * ],
27
30
  * expect: -3,
28
31
  * },
29
32
  * {
30
33
  * it: 'handles 0',
31
- * inputs: [0, 0],
34
+ * inputs: [
35
+ * 0,
36
+ * 0,
37
+ * ],
32
38
  * expect: 0,
33
39
  * },
34
40
  * {
35
41
  * it: 'adds',
36
- * inputs: [3, 5],
42
+ * inputs: [
43
+ * 3,
44
+ * 5,
45
+ * ],
37
46
  * expect: 8,
38
47
  * },
39
48
  * ]);
@@ -62,7 +71,10 @@ export function itCasesWithContext(functionToTest, testCasesOrCustomAsserter, ma
62
71
  : // as cast here to cover the case where the input has NO inputs
63
72
  [];
64
73
  if ('expect' in testCase) {
65
- await assert.output(asserter, functionToTest, [testContext, ...functionInputs], testCase.expect, testCase.it);
74
+ await assert.output(asserter, functionToTest, [
75
+ testContext,
76
+ ...functionInputs,
77
+ ], testCase.expect, testCase.it);
66
78
  }
67
79
  else {
68
80
  let caughtError = unsetError;
@@ -65,17 +65,26 @@ export type FunctionTestCase<FunctionToTest extends AnyFunction> = 1 extends Par
65
65
  * itCases(myFunctionToTest, [
66
66
  * {
67
67
  * it: 'handles negative numbers',
68
- * inputs: [-1, -2],
68
+ * inputs: [
69
+ * -1,
70
+ * -2,
71
+ * ],
69
72
  * expect: -3,
70
73
  * },
71
74
  * {
72
75
  * it: 'handles 0',
73
- * inputs: [0, 0],
76
+ * inputs: [
77
+ * 0,
78
+ * 0,
79
+ * ],
74
80
  * expect: 0,
75
81
  * },
76
82
  * {
77
83
  * it: 'adds',
78
- * inputs: [3, 5],
84
+ * inputs: [
85
+ * 3,
86
+ * 5,
87
+ * ],
79
88
  * expect: 8,
80
89
  * },
81
90
  * ]);
@@ -106,17 +115,26 @@ export declare function itCases<const FunctionToTest extends AnyFunction>(this:
106
115
  * itCases(myFunctionToTest, [
107
116
  * {
108
117
  * it: 'handles negative numbers',
109
- * inputs: [-1, -2],
118
+ * inputs: [
119
+ * -1,
120
+ * -2,
121
+ * ],
110
122
  * expect: -3,
111
123
  * },
112
124
  * {
113
125
  * it: 'handles 0',
114
- * inputs: [0, 0],
126
+ * inputs: [
127
+ * 0,
128
+ * 0,
129
+ * ],
115
130
  * expect: 0,
116
131
  * },
117
132
  * {
118
133
  * it: 'adds',
119
- * inputs: [3, 5],
134
+ * inputs: [
135
+ * 3,
136
+ * 5,
137
+ * ],
120
138
  * expect: 8,
121
139
  * },
122
140
  * ]);
@@ -23,17 +23,26 @@ const unsetError = Symbol('unset-error');
23
23
  * itCases(myFunctionToTest, [
24
24
  * {
25
25
  * it: 'handles negative numbers',
26
- * inputs: [-1, -2],
26
+ * inputs: [
27
+ * -1,
28
+ * -2,
29
+ * ],
27
30
  * expect: -3,
28
31
  * },
29
32
  * {
30
33
  * it: 'handles 0',
31
- * inputs: [0, 0],
34
+ * inputs: [
35
+ * 0,
36
+ * 0,
37
+ * ],
32
38
  * expect: 0,
33
39
  * },
34
40
  * {
35
41
  * it: 'adds',
36
- * inputs: [3, 5],
42
+ * inputs: [
43
+ * 3,
44
+ * 5,
45
+ * ],
37
46
  * expect: 8,
38
47
  * },
39
48
  * ]);
@@ -27,15 +27,24 @@ import { BaseFunctionWithContext, FunctionWithContextTestCase } from './it-cases
27
27
  * snapshotCasesWithContext(myFunctionToTest, [
28
28
  * {
29
29
  * it: 'handles negative numbers',
30
- * inputs: [-1, -2],
30
+ * inputs: [
31
+ * -1,
32
+ * -2,
33
+ * ],
31
34
  * },
32
35
  * {
33
36
  * it: 'handles 0',
34
- * inputs: [0, 0],
37
+ * inputs: [
38
+ * 0,
39
+ * 0,
40
+ * ],
35
41
  * },
36
42
  * {
37
43
  * it: 'adds',
38
- * inputs: [3, 5],
44
+ * inputs: [
45
+ * 3,
46
+ * 5,
47
+ * ],
39
48
  * },
40
49
  * ]);
41
50
  * });
@@ -30,15 +30,24 @@ import { assertSnapshot } from './universal-snapshot.js';
30
30
  * snapshotCasesWithContext(myFunctionToTest, [
31
31
  * {
32
32
  * it: 'handles negative numbers',
33
- * inputs: [-1, -2],
33
+ * inputs: [
34
+ * -1,
35
+ * -2,
36
+ * ],
34
37
  * },
35
38
  * {
36
39
  * it: 'handles 0',
37
- * inputs: [0, 0],
40
+ * inputs: [
41
+ * 0,
42
+ * 0,
43
+ * ],
38
44
  * },
39
45
  * {
40
46
  * it: 'adds',
41
- * inputs: [3, 5],
47
+ * inputs: [
48
+ * 3,
49
+ * 5,
50
+ * ],
42
51
  * },
43
52
  * ]);
44
53
  * });
@@ -21,15 +21,24 @@ import { type FunctionTestCase } from './it-cases.js';
21
21
  * snapshotCases(myFunctionToTest, [
22
22
  * {
23
23
  * it: 'handles negative numbers',
24
- * inputs: [-1, -2],
24
+ * inputs: [
25
+ * -1,
26
+ * -2,
27
+ * ],
25
28
  * },
26
29
  * {
27
30
  * it: 'handles 0',
28
- * inputs: [0, 0],
31
+ * inputs: [
32
+ * 0,
33
+ * 0,
34
+ * ],
29
35
  * },
30
36
  * {
31
37
  * it: 'adds',
32
- * inputs: [3, 5],
38
+ * inputs: [
39
+ * 3,
40
+ * 5,
41
+ * ],
33
42
  * },
34
43
  * ]);
35
44
  * });
@@ -23,15 +23,24 @@ import { assertSnapshot } from './universal-snapshot.js';
23
23
  * snapshotCases(myFunctionToTest, [
24
24
  * {
25
25
  * it: 'handles negative numbers',
26
- * inputs: [-1, -2],
26
+ * inputs: [
27
+ * -1,
28
+ * -2,
29
+ * ],
27
30
  * },
28
31
  * {
29
32
  * it: 'handles 0',
30
- * inputs: [0, 0],
33
+ * inputs: [
34
+ * 0,
35
+ * 0,
36
+ * ],
31
37
  * },
32
38
  * {
33
39
  * it: 'adds',
34
- * inputs: [3, 5],
40
+ * inputs: [
41
+ * 3,
42
+ * 5,
43
+ * ],
35
44
  * },
36
45
  * ]);
37
46
  * });
@@ -64,7 +64,10 @@ function flattenMochaParentTitles(node) {
64
64
  return [];
65
65
  }
66
66
  else {
67
- return [...flattenMochaParentTitles(node.parent), node.title];
67
+ return [
68
+ ...flattenMochaParentTitles(node.parent),
69
+ node.title,
70
+ ];
68
71
  }
69
72
  }
70
73
  function getTestName(testContext) {
@@ -77,7 +80,10 @@ function getTestName(testContext) {
77
80
  const currentSnapshotCount = getOrSet(snapshotCountObject, testName, () => 0);
78
81
  const newSnapshotCount = currentSnapshotCount + 1;
79
82
  snapshotCountObject[testName] = newSnapshotCount;
80
- const snapshotName = [testName, newSnapshotCount].join(' ');
83
+ const snapshotName = [
84
+ testName,
85
+ newSnapshotCount,
86
+ ].join(' ');
81
87
  return {
82
88
  snapshotName,
83
89
  testName,
@@ -3,7 +3,10 @@ import { getCenterOfElement } from './symlinked/element-position.js';
3
3
  async function sendMouseToMiddleOfElement(element, operationType) {
4
4
  const center = getCenterOfElement(element);
5
5
  await sendMouse({
6
- position: [center.x, center.y],
6
+ position: [
7
+ center.x,
8
+ center.y,
9
+ ],
7
10
  type: operationType,
8
11
  });
9
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/test",
3
- "version": "31.9.1",
3
+ "version": "31.9.2",
4
4
  "description": "A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.",
5
5
  "keywords": [
6
6
  "test",
@@ -42,22 +42,22 @@
42
42
  "test:web": "virmator test --no-deps web 'src/test-web/**/*.test.ts' 'src/augments/universal-testing-suite/**/*.test.ts'"
43
43
  },
44
44
  "dependencies": {
45
- "@augment-vir/assert": "^31.9.1",
46
- "@augment-vir/common": "^31.9.1",
45
+ "@augment-vir/assert": "^31.9.2",
46
+ "@augment-vir/common": "^31.9.2",
47
47
  "@open-wc/testing-helpers": "^3.0.1",
48
- "@virmator/test": "^13.12.0",
49
- "type-fest": "^4.33.0"
48
+ "@virmator/test": "^13.13.1",
49
+ "type-fest": "^4.35.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@types/node": "^22.13.0",
53
- "@web/dev-server-esbuild": "^1.0.3",
54
- "@web/test-runner": "^0.19.0",
52
+ "@types/node": "^22.13.4",
53
+ "@web/dev-server-esbuild": "^1.0.4",
54
+ "@web/test-runner": "^0.20.0",
55
55
  "@web/test-runner-commands": "^0.9.0",
56
56
  "@web/test-runner-playwright": "^0.11.0",
57
57
  "concurrently": "^9.1.2",
58
- "element-vir": "^23.1.1",
58
+ "element-vir": "^23.3.0",
59
59
  "istanbul-smart-text-reporter": "^1.1.5",
60
- "typescript": "^5.7.2"
60
+ "typescript": "^5.7.3"
61
61
  },
62
62
  "engines": {
63
63
  "node": ">=22"