@testforgejs/vue-test-plugin-router 1.0.0-beta.4 → 1.0.0-beta.6
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/dist/index.cjs +2 -1
- package/dist/index.d.cts +21 -24
- package/dist/index.d.ts +21 -24
- package/dist/index.js +2 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -47,7 +47,8 @@ var ROUTER_PLUGIN_NAME = "router";
|
|
|
47
47
|
var routerPlugin = {
|
|
48
48
|
getName: () => ROUTER_PLUGIN_NAME,
|
|
49
49
|
getDefinition: () => ({
|
|
50
|
-
create: createRouterPlugin
|
|
50
|
+
create: createRouterPlugin,
|
|
51
|
+
supportsInstanceReferences: true
|
|
51
52
|
}),
|
|
52
53
|
getDefaultOptions: defaultOptions
|
|
53
54
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -12,8 +12,11 @@ declare const ROUTER_PLUGIN_NAME: "router";
|
|
|
12
12
|
/**
|
|
13
13
|
* Configuration options for the Vue Router test plugin.
|
|
14
14
|
*
|
|
15
|
-
* Combines
|
|
16
|
-
*
|
|
15
|
+
* Combines native Vue Router options with TestForge-specific
|
|
16
|
+
* controls for managed plugin instances.
|
|
17
|
+
*
|
|
18
|
+
* TestForge control options are handled internally and are not
|
|
19
|
+
* forwarded to the native Vue Router factory.
|
|
17
20
|
*
|
|
18
21
|
* @example
|
|
19
22
|
* Configure the managed Vue Router plugin for a component test:
|
|
@@ -29,42 +32,36 @@ declare const ROUTER_PLUGIN_NAME: "router";
|
|
|
29
32
|
* });
|
|
30
33
|
* ```
|
|
31
34
|
*
|
|
32
|
-
* @see `RouterOptions` from `vue-router` for
|
|
33
|
-
* @see `PluginControlOptions` from `@testforgejs/vue-test-core` for instance capturing
|
|
35
|
+
* @see `RouterOptions` from `vue-router` for native Vue Router configuration.
|
|
36
|
+
* @see `PluginControlOptions` from `@testforgejs/vue-test-core` for type-safe instance capturing.
|
|
34
37
|
*/
|
|
35
38
|
type VueTestRouterOptions = RouterOptions & PluginControlOptions<Router>;
|
|
36
39
|
|
|
37
40
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* This module registers the router configuration in the global plugin map,
|
|
41
|
-
* which ensures strict typing when calling `testComponentFactory`.
|
|
41
|
+
* TestForge core type augmentation for Vue Router integration.
|
|
42
42
|
*
|
|
43
|
-
*
|
|
43
|
+
* Registers the public plugin configuration and runtime instance types
|
|
44
|
+
* used by TestForge's managed plugin APIs.
|
|
44
45
|
*/
|
|
45
46
|
declare module "@testforgejs/vue-test-core" {
|
|
46
47
|
/**
|
|
47
|
-
*
|
|
48
|
+
* Global map for TestForge plugin configuration options.
|
|
48
49
|
*/
|
|
49
50
|
interface PluginOptionsMap {
|
|
50
51
|
/**
|
|
51
|
-
* Configuration
|
|
52
|
-
* Accepts an object of type {@link VueTestRouterOptions} containing Vue router settings and control hooks.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* factory({}, {
|
|
57
|
-
* plugins: {
|
|
58
|
-
* router: {
|
|
59
|
-
* history: createMemoryHistory(),
|
|
60
|
-
* routes: [...]
|
|
61
|
-
* }
|
|
62
|
-
* }
|
|
63
|
-
* });
|
|
64
|
-
* ```
|
|
52
|
+
* Configuration accepted by the managed `router` plugin.
|
|
65
53
|
*/
|
|
66
54
|
[ROUTER_PLUGIN_NAME]: VueTestRouterOptions;
|
|
67
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Global map for managed plugin runtime instances.
|
|
58
|
+
*/
|
|
59
|
+
interface PluginInstanceMap {
|
|
60
|
+
/**
|
|
61
|
+
* Runtime Vue Router instance created by the managed `router` plugin.
|
|
62
|
+
*/
|
|
63
|
+
[ROUTER_PLUGIN_NAME]: Router;
|
|
64
|
+
}
|
|
68
65
|
}
|
|
69
66
|
|
|
70
67
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -12,8 +12,11 @@ declare const ROUTER_PLUGIN_NAME: "router";
|
|
|
12
12
|
/**
|
|
13
13
|
* Configuration options for the Vue Router test plugin.
|
|
14
14
|
*
|
|
15
|
-
* Combines
|
|
16
|
-
*
|
|
15
|
+
* Combines native Vue Router options with TestForge-specific
|
|
16
|
+
* controls for managed plugin instances.
|
|
17
|
+
*
|
|
18
|
+
* TestForge control options are handled internally and are not
|
|
19
|
+
* forwarded to the native Vue Router factory.
|
|
17
20
|
*
|
|
18
21
|
* @example
|
|
19
22
|
* Configure the managed Vue Router plugin for a component test:
|
|
@@ -29,42 +32,36 @@ declare const ROUTER_PLUGIN_NAME: "router";
|
|
|
29
32
|
* });
|
|
30
33
|
* ```
|
|
31
34
|
*
|
|
32
|
-
* @see `RouterOptions` from `vue-router` for
|
|
33
|
-
* @see `PluginControlOptions` from `@testforgejs/vue-test-core` for instance capturing
|
|
35
|
+
* @see `RouterOptions` from `vue-router` for native Vue Router configuration.
|
|
36
|
+
* @see `PluginControlOptions` from `@testforgejs/vue-test-core` for type-safe instance capturing.
|
|
34
37
|
*/
|
|
35
38
|
type VueTestRouterOptions = RouterOptions & PluginControlOptions<Router>;
|
|
36
39
|
|
|
37
40
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* This module registers the router configuration in the global plugin map,
|
|
41
|
-
* which ensures strict typing when calling `testComponentFactory`.
|
|
41
|
+
* TestForge core type augmentation for Vue Router integration.
|
|
42
42
|
*
|
|
43
|
-
*
|
|
43
|
+
* Registers the public plugin configuration and runtime instance types
|
|
44
|
+
* used by TestForge's managed plugin APIs.
|
|
44
45
|
*/
|
|
45
46
|
declare module "@testforgejs/vue-test-core" {
|
|
46
47
|
/**
|
|
47
|
-
*
|
|
48
|
+
* Global map for TestForge plugin configuration options.
|
|
48
49
|
*/
|
|
49
50
|
interface PluginOptionsMap {
|
|
50
51
|
/**
|
|
51
|
-
* Configuration
|
|
52
|
-
* Accepts an object of type {@link VueTestRouterOptions} containing Vue router settings and control hooks.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* factory({}, {
|
|
57
|
-
* plugins: {
|
|
58
|
-
* router: {
|
|
59
|
-
* history: createMemoryHistory(),
|
|
60
|
-
* routes: [...]
|
|
61
|
-
* }
|
|
62
|
-
* }
|
|
63
|
-
* });
|
|
64
|
-
* ```
|
|
52
|
+
* Configuration accepted by the managed `router` plugin.
|
|
65
53
|
*/
|
|
66
54
|
[ROUTER_PLUGIN_NAME]: VueTestRouterOptions;
|
|
67
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Global map for managed plugin runtime instances.
|
|
58
|
+
*/
|
|
59
|
+
interface PluginInstanceMap {
|
|
60
|
+
/**
|
|
61
|
+
* Runtime Vue Router instance created by the managed `router` plugin.
|
|
62
|
+
*/
|
|
63
|
+
[ROUTER_PLUGIN_NAME]: Router;
|
|
64
|
+
}
|
|
68
65
|
}
|
|
69
66
|
|
|
70
67
|
/**
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,8 @@ var ROUTER_PLUGIN_NAME = "router";
|
|
|
19
19
|
var routerPlugin = {
|
|
20
20
|
getName: () => ROUTER_PLUGIN_NAME,
|
|
21
21
|
getDefinition: () => ({
|
|
22
|
-
create: createRouterPlugin
|
|
22
|
+
create: createRouterPlugin,
|
|
23
|
+
supportsInstanceReferences: true
|
|
23
24
|
}),
|
|
24
25
|
getDefaultOptions: defaultOptions
|
|
25
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testforgejs/vue-test-plugin-router",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Official TestForge plugin for Vue Router integration in component tests",
|
|
6
6
|
"homepage": "https://github.com/testforgejs/testforge#readme",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"author": "Roman Levchenko",
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"vue-router": "^4.0.0 || ^5.0.0",
|
|
48
|
-
"@testforgejs/vue-test-core": "1.0.0-beta.
|
|
48
|
+
"@testforgejs/vue-test-core": "1.0.0-beta.5"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"vue-router": "^5.0.0",
|
|
52
|
-
"@testforgejs/vue-test-core": "1.0.0-beta.
|
|
52
|
+
"@testforgejs/vue-test-core": "1.0.0-beta.5"
|
|
53
53
|
},
|
|
54
54
|
"testforge": {
|
|
55
55
|
"plugin": {
|