twd-js 0.1.2 → 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/README.md +137 -53
- package/dist/cli.js +35 -0
- package/dist/commands/{mockResponses.d.ts → mockBridge.d.ts} +17 -3
- package/dist/index.d.ts +2 -0
- package/dist/mock-sw.js +1 -0
- package/dist/proxies/userEvent.d.ts +4 -0
- package/dist/twd-types.d.ts +0 -41
- package/dist/twd.d.ts +43 -2
- package/dist/twd.es.js +16782 -469
- package/dist/twd.umd.js +298 -5
- package/dist/ui/Icons/BaseIcon.d.ts +7 -0
- package/dist/ui/TWDSidebar.d.ts +5 -1
- package/dist/ui/TestListItem.d.ts +20 -0
- package/dist/utils/wait.d.ts +1 -0
- package/package.json +29 -4
- package/dist/commands/type.d.ts +0 -11
package/dist/ui/TWDSidebar.d.ts
CHANGED
|
@@ -5,5 +5,25 @@ interface TestListItemProps {
|
|
|
5
5
|
idx: number;
|
|
6
6
|
runTest: (i: number) => void;
|
|
7
7
|
}
|
|
8
|
+
export declare const statusStyles: (node: TestCase) => {
|
|
9
|
+
item: {
|
|
10
|
+
background: string;
|
|
11
|
+
};
|
|
12
|
+
container: {
|
|
13
|
+
borderLeft: string;
|
|
14
|
+
};
|
|
15
|
+
} | {
|
|
16
|
+
item: {
|
|
17
|
+
background: string;
|
|
18
|
+
};
|
|
19
|
+
container?: undefined;
|
|
20
|
+
};
|
|
21
|
+
export declare const assertStyles: (text: string) => {
|
|
22
|
+
color: string;
|
|
23
|
+
fontWeight: string;
|
|
24
|
+
} | {
|
|
25
|
+
color?: undefined;
|
|
26
|
+
fontWeight?: undefined;
|
|
27
|
+
};
|
|
8
28
|
export declare const TestListItem: ({ node, depth, idx, runTest }: TestListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
29
|
export {};
|
package/dist/utils/wait.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twd-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Test While Developing (TWD) - in-browser testing",
|
|
5
5
|
"main": "./dist/twd.umd.js",
|
|
6
6
|
"module": "./dist/twd.es.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"twd-js": "./dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git@github.com:BRIKEV/twd.git"
|
|
14
|
+
},
|
|
8
15
|
"exports": {
|
|
9
16
|
".": {
|
|
10
17
|
"types": "./dist/index.d.ts",
|
|
@@ -16,7 +23,7 @@
|
|
|
16
23
|
"dist"
|
|
17
24
|
],
|
|
18
25
|
"scripts": {
|
|
19
|
-
"build": "vite build",
|
|
26
|
+
"build": "vite build && vite build -c vite.sw.config.js && cp src/cli/installsw.js dist/cli.js",
|
|
20
27
|
"test": "vitest",
|
|
21
28
|
"test:ci": "vitest --run --coverage",
|
|
22
29
|
"conventional-changelog": "conventional-changelog -i CHANGELOG.md",
|
|
@@ -27,7 +34,11 @@
|
|
|
27
34
|
"react-dom": ">=17.0.0"
|
|
28
35
|
},
|
|
29
36
|
"devDependencies": {
|
|
30
|
-
"@
|
|
37
|
+
"@testing-library/dom": "^10.4.1",
|
|
38
|
+
"@testing-library/jest-dom": "^6.8.0",
|
|
39
|
+
"@testing-library/react": "^16.3.0",
|
|
40
|
+
"@testing-library/user-event": "^14.6.1",
|
|
41
|
+
"@types/react": "^19.1.13",
|
|
31
42
|
"@types/react-dom": "^19.1.9",
|
|
32
43
|
"@vitejs/plugin-react": "^5.0.2",
|
|
33
44
|
"@vitest/coverage-v8": "^3.2.4",
|
|
@@ -37,5 +48,19 @@
|
|
|
37
48
|
"vite": "^7.1.4",
|
|
38
49
|
"vite-plugin-dts": "^4.5.4",
|
|
39
50
|
"vitest": "^3.2.4"
|
|
40
|
-
}
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"testing",
|
|
54
|
+
"twd-js",
|
|
55
|
+
"twd",
|
|
56
|
+
"tdd",
|
|
57
|
+
"bdd",
|
|
58
|
+
"test",
|
|
59
|
+
"development",
|
|
60
|
+
"react",
|
|
61
|
+
"javascript",
|
|
62
|
+
"typescript",
|
|
63
|
+
"vite",
|
|
64
|
+
"vitest"
|
|
65
|
+
]
|
|
41
66
|
}
|
package/dist/commands/type.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Simulates typing text into an input or textarea element, character by character,
|
|
3
|
-
* dispatching keydown, keypress, input, and keyup events for each character.
|
|
4
|
-
* This more closely mimics real user input and works with React's state updates.
|
|
5
|
-
*
|
|
6
|
-
* @param el The input or textarea element
|
|
7
|
-
* @param text The text to type
|
|
8
|
-
* @returns The input element after typing
|
|
9
|
-
*/
|
|
10
|
-
declare const simulateType: (el: HTMLInputElement | HTMLTextAreaElement, text: string) => HTMLInputElement | HTMLTextAreaElement;
|
|
11
|
-
export { simulateType };
|