twd-js 1.3.0 → 1.3.2

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
@@ -147,9 +147,16 @@ Full documentation is available at [twd.dev](https://twd.dev) (coming soon) or i
147
147
  - [Writing Tests](docs/writing-tests.md)
148
148
  - [API Mocking](docs/api-mocking.md)
149
149
 
150
- ## Why TWD?
150
+ ## Examples
151
151
 
152
- 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.
153
160
 
154
161
  ## Contributing
155
162
 
package/dist/bundled.d.ts CHANGED
@@ -4,6 +4,24 @@ interface TestModule {
4
4
  interface InitTWDOptions {
5
5
  open?: boolean;
6
6
  position?: "left" | "right";
7
+ serviceWorker?: boolean;
8
+ serviceWorkerUrl?: string;
7
9
  }
10
+ /**
11
+ * Initialize TWD with tests and optional configuration
12
+ * @param files The test modules
13
+ * @param options The options for the initialization
14
+ * @param options.open Whether to open the sidebar
15
+ * @param options.position The position of the sidebar
16
+ * @param options.serviceWorker Whether to use the service worker
17
+ * @param options.serviceWorkerUrl The URL of the service worker
18
+ * @returns void
19
+ * @example
20
+ * initTWD(testModules, { open: true, position: 'left' });
21
+ * @example
22
+ * initTWD(testModules, { open: true, position: 'left', serviceWorker: false });
23
+ * @example
24
+ * initTWD(testModules, { open: true, position: 'left', serviceWorker: true, serviceWorkerUrl: '/mock-sw.js' });
25
+ */
8
26
  export declare const initTWD: (files: TestModule, options?: InitTWDOptions) => void;
9
27
  export {};