twd-js 1.7.1 → 1.7.3
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 +26 -4
- package/dist/asserts/index.d.ts +2 -0
- package/dist/bundled.d.ts +4 -1
- package/dist/bundled.es.js +9861 -602
- package/dist/cli.js +11 -11
- package/dist/commands/mockBridge.d.ts +117 -0
- package/dist/commands/url.d.ts +33 -0
- package/dist/commands/viewport.d.ts +2 -0
- package/dist/commands/visit.d.ts +1 -0
- package/dist/constants/version.d.ts +1 -0
- package/dist/global.d.ts +20 -0
- package/dist/index.cjs.js +33 -33
- package/dist/index.d.ts +8 -664
- package/dist/index.es.js +1695 -1657
- package/dist/initializers/initSidebar.d.ts +29 -0
- package/dist/initializers/initTests.d.ts +36 -0
- package/dist/mock-sw.js +1 -1
- package/dist/plugin/removeMockServiceWorker.d.ts +18 -0
- package/dist/plugin/twdHmr.d.ts +45 -0
- package/dist/proxies/domMessage.d.ts +1 -0
- package/dist/proxies/eventsMessage.d.ts +1 -0
- package/dist/proxies/screenDom.d.ts +45 -0
- package/dist/proxies/userEvent.d.ts +4 -0
- package/dist/runner-ci.d.ts +12 -28
- package/dist/runner.d.ts +52 -63
- package/dist/twd-types.d.ts +120 -0
- package/dist/twd.d.ts +291 -0
- package/dist/ui/ClosedSidebar.d.ts +6 -0
- package/dist/ui/Icons/BaseIcon.d.ts +7 -0
- package/dist/ui/Icons/ChevronDown.d.ts +2 -0
- package/dist/ui/Icons/ChevronRight.d.ts +2 -0
- package/dist/ui/Icons/Loader.d.ts +2 -0
- package/dist/ui/Icons/MockRequestIcon.d.ts +2 -0
- package/dist/ui/Icons/Play.d.ts +2 -0
- package/dist/ui/LogItem.d.ts +6 -0
- package/dist/ui/MockRulesButton.d.ts +1 -0
- package/dist/ui/MockedComponent.d.ts +6 -0
- package/dist/ui/SearchInput.d.ts +6 -0
- package/dist/ui/SkipOnlyName.d.ts +8 -0
- package/dist/ui/TWDSidebar.d.ts +20 -0
- package/dist/ui/TestList.d.ts +8 -0
- package/dist/ui/TestListItem.d.ts +19 -0
- package/dist/ui/componentMocks.d.ts +3 -0
- package/dist/ui/hooks/useLayout.d.ts +6 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/utils/buildTreeFromHandlers.d.ts +16 -0
- package/dist/ui/utils/chaiErrorFormat.d.ts +22 -0
- package/dist/ui/utils/filterTree.d.ts +2 -0
- package/dist/ui/utils/formatLogs.d.ts +30 -0
- package/dist/ui/utils/screenReaderMessages.d.ts +9 -0
- package/dist/ui/utils/styles.d.ts +7 -0
- package/dist/ui/utils/theme.d.ts +74 -0
- package/dist/ui.d.ts +2 -10
- package/dist/utils/assertionMessage.d.ts +1 -0
- package/dist/utils/log.d.ts +1 -0
- package/dist/utils/wait.d.ts +3 -0
- package/dist/utils/waitFor.d.ts +2 -0
- package/dist/vite-plugin.d.ts +2 -67
- package/package.json +31 -7
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# TWD
|
|
1
|
+
# TWD (Testing while developing)
|
|
2
2
|
|
|
3
3
|
[](https://github.com/BRIKEV/twd/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/twd-js)
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
[](https://qlty.sh/gh/BRIKEV/projects/twd)
|
|
7
7
|
[](https://qlty.sh/gh/BRIKEV/projects/twd)
|
|
8
8
|
|
|
9
|
-
<p>
|
|
10
|
-
<img src="./images/
|
|
9
|
+
<p align="center">
|
|
10
|
+
<img src="./images/twd-skill.gif" alt="TWD running with an AI agent" width="800">
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
|
-
TWD
|
|
13
|
+
TWD is a library designed to seamlessly integrate testing into your web development workflow. It streamlines the process of writing, running, and managing tests directly in your application, with a modern UI and powerful mocking capabilities.
|
|
14
14
|
|
|
15
15
|
**📖 [Full Documentation](https://brikev.github.io/twd/) | 🚀 [Getting Started](https://brikev.github.io/twd/getting-started) | 📚 [API Reference](https://brikev.github.io/twd/api/)**
|
|
16
16
|
|
|
@@ -166,6 +166,28 @@ Each example includes a complete setup guide and demonstrates best practices for
|
|
|
166
166
|
|
|
167
167
|
Contributions are welcome! Please open issues or pull requests on [GitHub](https://github.com/BRIKEV/twd).
|
|
168
168
|
|
|
169
|
+
## Contributors ✨
|
|
170
|
+
|
|
171
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
172
|
+
<!-- prettier-ignore-start -->
|
|
173
|
+
<!-- markdownlint-disable -->
|
|
174
|
+
<table>
|
|
175
|
+
<tbody>
|
|
176
|
+
<tr>
|
|
177
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kevinccbsg"><img src="https://avatars.githubusercontent.com/u/12685053?v=4?s=100" width="100px;" alt="Kevin Julián Martínez Escobar"/><br /><sub><b>Kevin Julián Martínez Escobar</b></sub></a><br /><a href="https://github.com/BRIKEV/twd/commits?author=kevinccbsg" title="Code">💻</a></td>
|
|
178
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/DamonCaos"><img src="https://avatars.githubusercontent.com/u/169996368?v=4?s=100" width="100px;" alt="Javier Rodriguez"/><br /><sub><b>Javier Rodriguez</b></sub></a><br /><a href="https://github.com/BRIKEV/twd/commits?author=DamonCaos" title="Documentation">📖</a></td>
|
|
179
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/codesthenos"><img src="https://avatars.githubusercontent.com/u/166174180?v=4?s=100" width="100px;" alt="Guillermo Ruiz Arranz"/><br /><sub><b>Guillermo Ruiz Arranz</b></sub></a><br /><a href="https://github.com/BRIKEV/twd/commits?author=codesthenos" title="Code">💻</a></td>
|
|
180
|
+
</tr>
|
|
181
|
+
</tbody>
|
|
182
|
+
</table>
|
|
183
|
+
|
|
184
|
+
<!-- markdownlint-restore -->
|
|
185
|
+
<!-- prettier-ignore-end -->
|
|
186
|
+
|
|
187
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
188
|
+
|
|
189
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!
|
|
190
|
+
|
|
169
191
|
## License
|
|
170
192
|
|
|
171
193
|
This project is licensed under the [MIT License](./LICENSE).
|
package/dist/bundled.d.ts
CHANGED
|
@@ -4,11 +4,12 @@ interface TestModule {
|
|
|
4
4
|
}
|
|
5
5
|
interface InitTWDOptions {
|
|
6
6
|
open?: boolean;
|
|
7
|
-
position?:
|
|
7
|
+
position?: 'left' | 'right';
|
|
8
8
|
serviceWorker?: boolean;
|
|
9
9
|
serviceWorkerUrl?: string;
|
|
10
10
|
theme?: Partial<TWDTheme>;
|
|
11
11
|
search?: boolean;
|
|
12
|
+
rootSelector?: string;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Initialize TWD with tests and optional configuration
|
|
@@ -28,6 +29,8 @@ interface InitTWDOptions {
|
|
|
28
29
|
* initTWD(testModules, { open: true, position: 'left', serviceWorker: true, serviceWorkerUrl: '/mock-sw.js' });
|
|
29
30
|
* @example
|
|
30
31
|
* initTWD(testModules, { open: true, position: 'left', theme: { primary: '#ff0000', background: '#ffffff' } });
|
|
32
|
+
* @example
|
|
33
|
+
* initTWD(testModules, { rootSelector: '#my-app' });
|
|
31
34
|
*/
|
|
32
35
|
export declare const initTWD: (files: TestModule, options?: InitTWDOptions) => void;
|
|
33
36
|
export {};
|