@augment-vir/test 31.0.0 → 31.0.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.
@@ -65,26 +65,17 @@ export type FunctionTestCase<FunctionToTest extends AnyFunction> = 1 extends Par
65
65
  * itCases(myFunctionToTest, [
66
66
  * {
67
67
  * it: 'handles negative numbers',
68
- * inputs: [
69
- * -1,
70
- * -2,
71
- * ],
68
+ * inputs: [-1, -2],
72
69
  * expect: -3,
73
70
  * },
74
71
  * {
75
72
  * it: 'handles 0',
76
- * inputs: [
77
- * 0,
78
- * 0,
79
- * ],
73
+ * inputs: [0, 0],
80
74
  * expect: 0,
81
75
  * },
82
76
  * {
83
77
  * it: 'adds',
84
- * inputs: [
85
- * 3,
86
- * 5,
87
- * ],
78
+ * inputs: [3, 5],
88
79
  * expect: 8,
89
80
  * },
90
81
  * ]);
@@ -115,26 +106,17 @@ export declare function itCases<const FunctionToTest extends AnyFunction>(functi
115
106
  * itCases(myFunctionToTest, [
116
107
  * {
117
108
  * it: 'handles negative numbers',
118
- * inputs: [
119
- * -1,
120
- * -2,
121
- * ],
109
+ * inputs: [-1, -2],
122
110
  * expect: -3,
123
111
  * },
124
112
  * {
125
113
  * it: 'handles 0',
126
- * inputs: [
127
- * 0,
128
- * 0,
129
- * ],
114
+ * inputs: [0, 0],
130
115
  * expect: 0,
131
116
  * },
132
117
  * {
133
118
  * it: 'adds',
134
- * inputs: [
135
- * 3,
136
- * 5,
137
- * ],
119
+ * inputs: [3, 5],
138
120
  * expect: 8,
139
121
  * },
140
122
  * ]);
@@ -23,26 +23,17 @@ const unsetError = Symbol('unset-error');
23
23
  * itCases(myFunctionToTest, [
24
24
  * {
25
25
  * it: 'handles negative numbers',
26
- * inputs: [
27
- * -1,
28
- * -2,
29
- * ],
26
+ * inputs: [-1, -2],
30
27
  * expect: -3,
31
28
  * },
32
29
  * {
33
30
  * it: 'handles 0',
34
- * inputs: [
35
- * 0,
36
- * 0,
37
- * ],
31
+ * inputs: [0, 0],
38
32
  * expect: 0,
39
33
  * },
40
34
  * {
41
35
  * it: 'adds',
42
- * inputs: [
43
- * 3,
44
- * 5,
45
- * ],
36
+ * inputs: [3, 5],
46
37
  * expect: 8,
47
38
  * },
48
39
  * ]);
@@ -21,24 +21,15 @@ import { type FunctionTestCase } from './it-cases.js';
21
21
  * snapshotCases(myFunctionToTest, [
22
22
  * {
23
23
  * it: 'handles negative numbers',
24
- * inputs: [
25
- * -1,
26
- * -2,
27
- * ],
24
+ * inputs: [-1, -2],
28
25
  * },
29
26
  * {
30
27
  * it: 'handles 0',
31
- * inputs: [
32
- * 0,
33
- * 0,
34
- * ],
28
+ * inputs: [0, 0],
35
29
  * },
36
30
  * {
37
31
  * it: 'adds',
38
- * inputs: [
39
- * 3,
40
- * 5,
41
- * ],
32
+ * inputs: [3, 5],
42
33
  * },
43
34
  * ]);
44
35
  * });
@@ -23,24 +23,15 @@ import { assertSnapshot } from './universal-snapshot.js';
23
23
  * snapshotCases(myFunctionToTest, [
24
24
  * {
25
25
  * it: 'handles negative numbers',
26
- * inputs: [
27
- * -1,
28
- * -2,
29
- * ],
26
+ * inputs: [-1, -2],
30
27
  * },
31
28
  * {
32
29
  * it: 'handles 0',
33
- * inputs: [
34
- * 0,
35
- * 0,
36
- * ],
30
+ * inputs: [0, 0],
37
31
  * },
38
32
  * {
39
33
  * it: 'adds',
40
- * inputs: [
41
- * 3,
42
- * 5,
43
- * ],
34
+ * inputs: [3, 5],
44
35
  * },
45
36
  * ]);
46
37
  * });
@@ -64,10 +64,7 @@ function flattenMochaParentTitles(node) {
64
64
  return [];
65
65
  }
66
66
  else {
67
- return [
68
- ...flattenMochaParentTitles(node.parent),
69
- node.title,
70
- ];
67
+ return [...flattenMochaParentTitles(node.parent), node.title];
71
68
  }
72
69
  }
73
70
  function getTestName(testContext) {
@@ -80,10 +77,7 @@ function getTestName(testContext) {
80
77
  const currentSnapshotCount = getOrSet(snapshotCountObject, testName, () => 0);
81
78
  const newSnapshotCount = currentSnapshotCount + 1;
82
79
  snapshotCountObject[testName] = newSnapshotCount;
83
- const snapshotName = [
84
- testName,
85
- newSnapshotCount,
86
- ].join(' ');
80
+ const snapshotName = [testName, newSnapshotCount].join(' ');
87
81
  return {
88
82
  snapshotName,
89
83
  testName,
@@ -3,10 +3,7 @@ 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: [
7
- center.x,
8
- center.y,
9
- ],
6
+ position: [center.x, center.y],
10
7
  type: operationType,
11
8
  });
12
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/test",
3
- "version": "31.0.0",
3
+ "version": "31.0.1",
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,8 +42,8 @@
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.0.0",
46
- "@augment-vir/common": "^31.0.0",
45
+ "@augment-vir/assert": "^31.0.1",
46
+ "@augment-vir/common": "^31.0.1",
47
47
  "@open-wc/testing-helpers": "^3.0.1",
48
48
  "@virmator/test": "^13.10.3",
49
49
  "type-fest": "^4.29.0"