twd-js 1.3.0-beta.2 โ†’ 1.3.1

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 CHANGED
@@ -36,27 +36,34 @@ pnpm add twd-js
36
36
 
37
37
  ## Quick Start
38
38
 
39
- 1. **Add TWD to your React app:**
39
+ ### React (Standard)
40
40
 
41
- ```tsx
42
- // src/main.tsx
43
- import { StrictMode } from "react";
44
- import { createRoot } from "react-dom/client";
45
- import App from "./App";
41
+ Add this to your entry file (e.g., `src/main.tsx`):
46
42
 
43
+ ```tsx
47
44
  if (import.meta.env.DEV) {
48
45
  const testModules = import.meta.glob("./**/*.twd.test.ts");
49
46
  const { initTests, twd, TWDSidebar } = await import('twd-js');
50
47
  initTests(testModules, <TWDSidebar open={true} position="left" />, createRoot);
51
48
  twd.initRequestMocking().catch(console.error);
52
49
  }
50
+ ```
53
51
 
54
- createRoot(document.getElementById("root")!).render(
55
- <StrictMode><App /></StrictMode>
56
- );
52
+ ### Vue / Angular / Other Frameworks (Bundled)
53
+
54
+ TWD now supports any framework via its bundled version.
55
+
56
+ ```ts
57
+ if (import.meta.env.DEV) {
58
+ const { initTWD } = await import('twd-js/bundled');
59
+ const tests = import.meta.glob("./**/*.twd.test.ts");
60
+ initTWD(tests);
61
+ }
57
62
  ```
58
63
 
59
- 2. **Write your first test:**
64
+ Check the [Framework Integration Guide](https://brikev.github.io/twd/frameworks) for more details.
65
+
66
+ ## Writing Tests
60
67
 
61
68
  ```ts
62
69
  // src/app.twd.test.ts
@@ -131,17 +138,25 @@ twd.mockRequest("getUser", {
131
138
  const rule = await twd.waitForRequest("getUser");
132
139
  ```
133
140
 
134
- ## Learn More
141
+ ## Documentation
135
142
 
136
- - ๐Ÿ“– **[Full Documentation](https://brikev.github.io/twd/)** - Complete guides and tutorials
137
- - ๐ŸŽฏ **[Writing Tests](https://brikev.github.io/twd/writing-tests)** - Learn how to write effective tests
138
- - ๐Ÿ”ฅ **[API Mocking](https://brikev.github.io/twd/api-mocking)** - Mock API requests in your tests
139
- - ๐Ÿ“š **[API Reference](https://brikev.github.io/twd/api/)** - Complete API documentation
140
- - ๐Ÿงช **[Testing Library Support](https://brikev.github.io/twd/react-testing-library)** - Use semantic queries
143
+ Full documentation is available at [twd.dev](https://twd.dev) (coming soon) or in the `docs` folder.
144
+
145
+ - [Getting Started](docs/getting-started.md)
146
+ - [Framework Integration](docs/frameworks.md)
147
+ - [Writing Tests](docs/writing-tests.md)
148
+ - [API Mocking](docs/api-mocking.md)
141
149
 
142
150
  ## Examples
143
151
 
144
- Check out the [examples directory](https://github.com/BRIKEV/twd/tree/main/examples) for complete working examples.
152
+ Check out our working examples for various frameworks:
153
+
154
+ - **[Examples Directory](./examples)** - Local examples for React, Vue, and Astro
155
+ - **[Vue Example](https://github.com/BRIKEV/twd-vue-example)** - Vue 3 with advanced scenarios
156
+ - **[Solid Example](https://github.com/BRIKEV/twd-solid-example)** - Solid.js integration
157
+ - **[Angular Example](https://github.com/BRIKEV/twd-angular-example)** - Angular setup
158
+
159
+ Each example includes a complete setup guide and demonstrates best practices for testing with TWD including ci integration.
145
160
 
146
161
  ## Contributing
147
162