@testforgejs/vue-test-plugin-router 1.0.0-beta.3 → 1.0.0-beta.5
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 +43 -27
- package/dist/index.d.ts +43 -27
- 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
|
@@ -1,55 +1,71 @@
|
|
|
1
1
|
import { RouterOptions, Router } from 'vue-router';
|
|
2
2
|
import { PluginControlOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Stable TestForge identifier for the managed Vue Router plugin.
|
|
6
|
+
*
|
|
7
|
+
* Use this identifier when declaring Router configuration
|
|
8
|
+
* in presets and other plugin-aware TestForge APIs.
|
|
9
|
+
*/
|
|
4
10
|
declare const ROUTER_PLUGIN_NAME: "router";
|
|
5
11
|
|
|
6
12
|
/**
|
|
7
13
|
* Configuration options for the Vue Router test plugin.
|
|
8
14
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
15
|
+
* Combines standard Vue Router configuration (`RouterOptions` from `vue-router`)
|
|
16
|
+
* with TestForge plugin control options.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* Configure the managed Vue Router plugin for a component test:
|
|
11
20
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* factory({}, {
|
|
23
|
+
* plugins: {
|
|
24
|
+
* router: {
|
|
25
|
+
* history: createMemoryHistory(),
|
|
26
|
+
* routes: [],
|
|
27
|
+
* },
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @see `RouterOptions` from `vue-router` for configuring routes and history.
|
|
33
|
+
* @see `PluginControlOptions` from `@testforgejs/vue-test-core` for instance capturing and exposure mechanisms.
|
|
14
34
|
*/
|
|
15
|
-
|
|
16
|
-
}
|
|
35
|
+
type VueTestRouterOptions = RouterOptions & PluginControlOptions<Router>;
|
|
17
36
|
|
|
18
37
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* This module registers the router configuration in the global plugin map,
|
|
22
|
-
* which ensures strict typing when calling `testComponentFactory`.
|
|
38
|
+
* TestForge core type augmentation for Vue Router integration.
|
|
23
39
|
*
|
|
24
|
-
*
|
|
40
|
+
* Registers the public plugin configuration and runtime instance types
|
|
41
|
+
* used by TestForge's managed plugin APIs.
|
|
25
42
|
*/
|
|
26
43
|
declare module "@testforgejs/vue-test-core" {
|
|
27
44
|
/**
|
|
28
|
-
*
|
|
45
|
+
* Global map for TestForge plugin configuration options.
|
|
29
46
|
*/
|
|
30
47
|
interface PluginOptionsMap {
|
|
31
48
|
/**
|
|
32
|
-
* Configuration
|
|
33
|
-
* Accepts an object of type {@link VueTestRouterOptions} containing Vue router settings and control hooks.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* factory({}, {
|
|
38
|
-
* plugins: {
|
|
39
|
-
* router: {
|
|
40
|
-
* history: createMemoryHistory(),
|
|
41
|
-
* routes: [...]
|
|
42
|
-
* }
|
|
43
|
-
* }
|
|
44
|
-
* });
|
|
45
|
-
* ```
|
|
49
|
+
* Configuration accepted by the managed `router` plugin.
|
|
46
50
|
*/
|
|
47
51
|
[ROUTER_PLUGIN_NAME]: VueTestRouterOptions;
|
|
48
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Global map for managed plugin runtime instances.
|
|
55
|
+
*/
|
|
56
|
+
interface PluginInstanceMap {
|
|
57
|
+
/**
|
|
58
|
+
* Runtime Vue Router instance created by the managed `router` plugin.
|
|
59
|
+
*/
|
|
60
|
+
[ROUTER_PLUGIN_NAME]: Router;
|
|
61
|
+
}
|
|
49
62
|
}
|
|
50
63
|
|
|
51
64
|
/**
|
|
52
|
-
*
|
|
65
|
+
* Managed Vue Router plugin module for TestForge.
|
|
66
|
+
*
|
|
67
|
+
* Provides the runtime definition for creating Vue Router instances
|
|
68
|
+
* and exposes the default configuration used by TestForge-managed presets.
|
|
53
69
|
*/
|
|
54
70
|
declare const routerPlugin: PluginModuleWithDefaults<Router, VueTestRouterOptions>;
|
|
55
71
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,55 +1,71 @@
|
|
|
1
1
|
import { RouterOptions, Router } from 'vue-router';
|
|
2
2
|
import { PluginControlOptions, PluginModuleWithDefaults } from '@testforgejs/vue-test-core';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Stable TestForge identifier for the managed Vue Router plugin.
|
|
6
|
+
*
|
|
7
|
+
* Use this identifier when declaring Router configuration
|
|
8
|
+
* in presets and other plugin-aware TestForge APIs.
|
|
9
|
+
*/
|
|
4
10
|
declare const ROUTER_PLUGIN_NAME: "router";
|
|
5
11
|
|
|
6
12
|
/**
|
|
7
13
|
* Configuration options for the Vue Router test plugin.
|
|
8
14
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
15
|
+
* Combines standard Vue Router configuration (`RouterOptions` from `vue-router`)
|
|
16
|
+
* with TestForge plugin control options.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* Configure the managed Vue Router plugin for a component test:
|
|
11
20
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* factory({}, {
|
|
23
|
+
* plugins: {
|
|
24
|
+
* router: {
|
|
25
|
+
* history: createMemoryHistory(),
|
|
26
|
+
* routes: [],
|
|
27
|
+
* },
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @see `RouterOptions` from `vue-router` for configuring routes and history.
|
|
33
|
+
* @see `PluginControlOptions` from `@testforgejs/vue-test-core` for instance capturing and exposure mechanisms.
|
|
14
34
|
*/
|
|
15
|
-
|
|
16
|
-
}
|
|
35
|
+
type VueTestRouterOptions = RouterOptions & PluginControlOptions<Router>;
|
|
17
36
|
|
|
18
37
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* This module registers the router configuration in the global plugin map,
|
|
22
|
-
* which ensures strict typing when calling `testComponentFactory`.
|
|
38
|
+
* TestForge core type augmentation for Vue Router integration.
|
|
23
39
|
*
|
|
24
|
-
*
|
|
40
|
+
* Registers the public plugin configuration and runtime instance types
|
|
41
|
+
* used by TestForge's managed plugin APIs.
|
|
25
42
|
*/
|
|
26
43
|
declare module "@testforgejs/vue-test-core" {
|
|
27
44
|
/**
|
|
28
|
-
*
|
|
45
|
+
* Global map for TestForge plugin configuration options.
|
|
29
46
|
*/
|
|
30
47
|
interface PluginOptionsMap {
|
|
31
48
|
/**
|
|
32
|
-
* Configuration
|
|
33
|
-
* Accepts an object of type {@link VueTestRouterOptions} containing Vue router settings and control hooks.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* factory({}, {
|
|
38
|
-
* plugins: {
|
|
39
|
-
* router: {
|
|
40
|
-
* history: createMemoryHistory(),
|
|
41
|
-
* routes: [...]
|
|
42
|
-
* }
|
|
43
|
-
* }
|
|
44
|
-
* });
|
|
45
|
-
* ```
|
|
49
|
+
* Configuration accepted by the managed `router` plugin.
|
|
46
50
|
*/
|
|
47
51
|
[ROUTER_PLUGIN_NAME]: VueTestRouterOptions;
|
|
48
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Global map for managed plugin runtime instances.
|
|
55
|
+
*/
|
|
56
|
+
interface PluginInstanceMap {
|
|
57
|
+
/**
|
|
58
|
+
* Runtime Vue Router instance created by the managed `router` plugin.
|
|
59
|
+
*/
|
|
60
|
+
[ROUTER_PLUGIN_NAME]: Router;
|
|
61
|
+
}
|
|
49
62
|
}
|
|
50
63
|
|
|
51
64
|
/**
|
|
52
|
-
*
|
|
65
|
+
* Managed Vue Router plugin module for TestForge.
|
|
66
|
+
*
|
|
67
|
+
* Provides the runtime definition for creating Vue Router instances
|
|
68
|
+
* and exposes the default configuration used by TestForge-managed presets.
|
|
53
69
|
*/
|
|
54
70
|
declare const routerPlugin: PluginModuleWithDefaults<Router, VueTestRouterOptions>;
|
|
55
71
|
|
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.5",
|
|
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.4"
|
|
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.4"
|
|
53
53
|
},
|
|
54
54
|
"testforge": {
|
|
55
55
|
"plugin": {
|