@augment-vir/test 31.30.1 → 31.32.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.
|
@@ -49,6 +49,15 @@ export type ContextByEnv = {
|
|
|
49
49
|
* @package [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test)
|
|
50
50
|
*/
|
|
51
51
|
export declare function extractTestName(testContext: UniversalTestContext): string;
|
|
52
|
+
/**
|
|
53
|
+
* Same as {@link extractTestName} but sanitizes the output so that it's safe for directory names
|
|
54
|
+
* (even on Windows).
|
|
55
|
+
*
|
|
56
|
+
* @category Test : Util
|
|
57
|
+
* @category Package : @augment-vir/test
|
|
58
|
+
* @package [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test)
|
|
59
|
+
*/
|
|
60
|
+
export declare function extractTestNameAsDir(testContext: UniversalTestContext): string;
|
|
52
61
|
/**
|
|
53
62
|
* Asserts that the given context is for the given env and returns that context.
|
|
54
63
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { camelCaseToKebabCase } from '@augment-vir/common';
|
|
1
2
|
import { RuntimeEnv } from '@augment-vir/core';
|
|
2
3
|
export { RuntimeEnv } from '@augment-vir/core';
|
|
3
4
|
/**
|
|
@@ -16,6 +17,17 @@ export function extractTestName(testContext) {
|
|
|
16
17
|
return flattenMochaParentTitles(testContext.test).join(' > ');
|
|
17
18
|
}
|
|
18
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Same as {@link extractTestName} but sanitizes the output so that it's safe for directory names
|
|
22
|
+
* (even on Windows).
|
|
23
|
+
*
|
|
24
|
+
* @category Test : Util
|
|
25
|
+
* @category Package : @augment-vir/test
|
|
26
|
+
* @package [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test)
|
|
27
|
+
*/
|
|
28
|
+
export function extractTestNameAsDir(testContext) {
|
|
29
|
+
return camelCaseToKebabCase(extractTestName(testContext)).replaceAll(/[<>:"/\-\\|?*_\s]+/g, '_');
|
|
30
|
+
}
|
|
19
31
|
function flattenMochaParentTitles(node) {
|
|
20
32
|
if (node.root) {
|
|
21
33
|
return [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/test",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.32.0",
|
|
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",
|
|
@@ -43,22 +43,22 @@
|
|
|
43
43
|
"test:web": "virmator test --no-deps web 'src/test-web/**/*.test.ts' 'src/augments/universal-testing-suite/**/*.test.ts'"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@augment-vir/assert": "^31.
|
|
47
|
-
"@augment-vir/common": "^31.
|
|
46
|
+
"@augment-vir/assert": "^31.32.0",
|
|
47
|
+
"@augment-vir/common": "^31.32.0",
|
|
48
48
|
"@open-wc/testing-helpers": "^3.0.1",
|
|
49
49
|
"@virmator/test": "^13.15.6",
|
|
50
50
|
"type-fest": "^4.41.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@types/node": "^24.
|
|
53
|
+
"@types/node": "^24.2.0",
|
|
54
54
|
"@web/dev-server-esbuild": "^1.0.4",
|
|
55
55
|
"@web/test-runner": "^0.20.2",
|
|
56
56
|
"@web/test-runner-commands": "^0.9.0",
|
|
57
57
|
"@web/test-runner-playwright": "^0.11.1",
|
|
58
58
|
"concurrently": "^9.2.0",
|
|
59
|
-
"element-vir": "^26.
|
|
59
|
+
"element-vir": "^26.7.1",
|
|
60
60
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
61
|
-
"typescript": "^5.
|
|
61
|
+
"typescript": "^5.9.2"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"element-vir": "*"
|