@augment-vir/test 30.6.0 → 30.6.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.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { check } from '@augment-vir/assert';
|
|
2
2
|
import { extractErrorMessage, log, RuntimeEnv } from '@augment-vir/common';
|
|
3
|
-
import { SnapshotCommand, } from '@virmator/test/dist/web-snapshot-plugin/snapshot-payload.js';
|
|
4
3
|
import { isTestContext } from './universal-test-context.js';
|
|
5
4
|
/**
|
|
6
5
|
* An error that is thrown from {@link assertSnapshot} when the snapshot comparison fails due to the
|
|
@@ -47,6 +46,7 @@ export async function assertSnapshot(testContext, data) {
|
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
else {
|
|
49
|
+
const { SnapshotCommand } = await import('@virmator/test/dist/web-snapshot-plugin/snapshot-payload.js');
|
|
50
50
|
const { executeServerCommand } = await import('@web/test-runner-commands');
|
|
51
51
|
const result = await executeServerCommand(SnapshotCommand.CompareSnapshot, {
|
|
52
52
|
content: serializedData,
|
|
@@ -45,7 +45,7 @@ export type ContextByEnv = {
|
|
|
45
45
|
* @throws `TypeError` if the context does not match the env.
|
|
46
46
|
* @package [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test)
|
|
47
47
|
*/
|
|
48
|
-
export declare function assertWrapTestContext<const SpecificEnv extends RuntimeEnv>(context: UniversalTestContext, env:
|
|
48
|
+
export declare function assertWrapTestContext<const SpecificEnv extends RuntimeEnv>(context: UniversalTestContext, env: SpecificEnv): ContextByEnv[SpecificEnv];
|
|
49
49
|
/**
|
|
50
50
|
* Asserts that the given context is for the given env, otherwise throws an Error.
|
|
51
51
|
*
|
|
@@ -53,7 +53,7 @@ export declare function assertWrapTestContext<const SpecificEnv extends RuntimeE
|
|
|
53
53
|
* @category Package : @augment-vir/test
|
|
54
54
|
* @package [`@augment-vir/test`](https://www.npmjs.com/package/@augment-vir/test)
|
|
55
55
|
*/
|
|
56
|
-
export declare function assertTestContext<const SpecificEnv extends RuntimeEnv>(context: UniversalTestContext, env:
|
|
56
|
+
export declare function assertTestContext<const SpecificEnv extends RuntimeEnv>(context: UniversalTestContext, env: SpecificEnv): asserts context is ContextByEnv[SpecificEnv];
|
|
57
57
|
/**
|
|
58
58
|
* Checks that the given context is for the given env.
|
|
59
59
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/test",
|
|
3
|
-
"version": "30.6.
|
|
3
|
+
"version": "30.6.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,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": "^30.6.
|
|
46
|
-
"@augment-vir/common": "^30.6.
|
|
45
|
+
"@augment-vir/assert": "^30.6.2",
|
|
46
|
+
"@augment-vir/common": "^30.6.2",
|
|
47
47
|
"@open-wc/testing-helpers": "^3.0.1",
|
|
48
48
|
"@virmator/test": "^13.7.0",
|
|
49
49
|
"type-fest": "^4.26.1"
|