@vobs/test-utils 0.1.0 → 0.3.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.
- package/dist/index.d.ts +4 -4
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -9,16 +9,16 @@ import { type PageDefinition } from '@vobs/runtime-dom';
|
|
|
9
9
|
import { type RenderPageOptions, type RenderPageResult } from '@vobs/server-renderer';
|
|
10
10
|
import { type ThemeController, type ThemeControllerOptions, type ThemeTarget } from '@vobs/ui';
|
|
11
11
|
import { type UiEnvironment } from '@vobs/ui/icons';
|
|
12
|
-
export interface TestEnvironmentOptions extends Partial<PageEnvironment
|
|
12
|
+
export interface TestEnvironmentOptions<InitialState = unknown> extends Partial<PageEnvironment<InitialState>> {
|
|
13
13
|
readonly baseUrl?: string;
|
|
14
14
|
readonly errors?: unknown[];
|
|
15
15
|
}
|
|
16
16
|
export interface TestContainer extends Element {
|
|
17
17
|
readonly items: Element[];
|
|
18
18
|
}
|
|
19
|
-
export interface TestPageHarness {
|
|
19
|
+
export interface TestPageHarness<InitialState = unknown> {
|
|
20
20
|
readonly container: TestContainer;
|
|
21
|
-
readonly environment: PageEnvironment
|
|
21
|
+
readonly environment: PageEnvironment<InitialState>;
|
|
22
22
|
readonly instance: PageInstance;
|
|
23
23
|
cleanup(): void;
|
|
24
24
|
}
|
|
@@ -39,7 +39,7 @@ export interface TestThemeTarget extends ThemeTarget {
|
|
|
39
39
|
readonly attributes: Readonly<Record<string, string>>;
|
|
40
40
|
readonly variables: ReadonlyMap<string, string>;
|
|
41
41
|
}
|
|
42
|
-
export declare function createTestEnvironment(options?: TestEnvironmentOptions): PageEnvironment
|
|
42
|
+
export declare function createTestEnvironment<InitialState = unknown>(options?: TestEnvironmentOptions<InitialState>): PageEnvironment<InitialState>;
|
|
43
43
|
export declare function createTestContainer(initialRoot?: Element): TestContainer;
|
|
44
44
|
export declare function mountTestPage(page: PageDefinition, options?: {
|
|
45
45
|
readonly container?: TestContainer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vobs/test-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Mount, hydrate and cleanup test harnesses for vobs applications and components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://github.com/vobsjs/vobs#readme",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@vobs/icons": "0.
|
|
22
|
-
"@vobs/
|
|
23
|
-
"@vobs/
|
|
24
|
-
"@vobs/runtime-
|
|
25
|
-
"@vobs/
|
|
26
|
-
"@vobs/server-renderer": "0.
|
|
27
|
-
"@vobs/ui": "0.
|
|
21
|
+
"@vobs/icons": "0.3.0",
|
|
22
|
+
"@vobs/reactivity": "0.3.0",
|
|
23
|
+
"@vobs/runtime-core": "0.3.0",
|
|
24
|
+
"@vobs/runtime-dom": "0.3.0",
|
|
25
|
+
"@vobs/i18n": "0.3.0",
|
|
26
|
+
"@vobs/server-renderer": "0.3.0",
|
|
27
|
+
"@vobs/ui": "0.3.0"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist"
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
"main": "./dist/index.js",
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
44
|
+
"node": ">=22.12.0"
|
|
45
45
|
}
|
|
46
46
|
}
|