@leaflink/dom-testing-utils 5.3.2 → 6.0.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 CHANGED
@@ -53,51 +53,42 @@ For detailed commit conventions and manual release instructions, see [CONTRIBUTI
53
53
 
54
54
  ## Dependency updates
55
55
 
56
- Dependency updates are handled by self-hosted [Renovate](https://docs.renovatebot.com/), invoked from `.github/workflows/renovate.yml` using a PAT (`RENOVATE_PAT`) issued from the `leaflink-automation` account. Configuration lives in [`.github/renovate.json5`](.github/renovate.json5). Tracking ticket: [MKPL-1055](https://leaflink.atlassian.net/browse/MKPL-1055).
56
+ Dependency updates are handled by self-hosted [Renovate](https://docs.renovatebot.com/) (Dependabot has been removed), invoked from `.github/workflows/renovate.yml` using a PAT (`RENOVATE_PAT`) issued from the `leaflink-automation` account. Configuration lives in [`.github/renovate.json5`](.github/renovate.json5). Tracking ticket: [MKPL-1055](https://leaflink.atlassian.net/browse/MKPL-1055).
57
57
 
58
58
  ### Schedule
59
59
 
60
- - Workflow cron wakes Renovate hourly.
61
- - Renovate only opens PRs between **1am–5am America/New_York**, every day.
62
- - A new release must be **≥ 10 days old** (`minimumReleaseAge`) before Renovate will propose it — buffer against compromised/withdrawn publishes.
63
- - Merging is handled by a separate workflow (see [Auto-merge](#auto-merge)) that runs whenever required CI completes — independent of Renovate's schedule.
60
+ - Workflow cron wakes Renovate hourly; Renovate only **opens** `dependencies` / `peerDependencies` and lockfile maintenance PRs on **Mondays between 1am–5am America/New_York**, and every other PR on **the 1st of the month, 1am–5am**. Security PRs skip both windows. It rebases an already-open PR that falls behind main on any hourly run (`updateNotScheduled: true`, `rebaseWhen: 'behind-base-branch'`), which the default-branch ruleset's `strict_required_status_checks_policy` requires before that PR can merge.
61
+ - A new release must be **≥ 10 days old** (`minimumReleaseAge`) before Renovate will propose it — buffer against compromised/withdrawn publishes. Pending updates park on the Dependency Dashboard (`internalChecksFilter: strict`) instead of opening un-mergeable PRs. pnpm enforces the same gate at install time (`minimumReleaseAge` in `pnpm-workspace.yaml`), covering the transitives Renovate doesn't gate. `@leaflink/*` packages are exempt on both sides.
62
+ - Merging is GitHub-native auto-merge (see [Auto-merge](#auto-merge)) and lands as soon as required CI passes — independent of Renovate's schedule.
64
63
 
65
64
  ### Update groups and auto-merge policy
66
65
 
67
66
  | Source | Update type | PR shape | Auto-merge |
68
67
  |---|---|---|---|
69
- | `devDependencies` | any | grouped as one PR (`chore(deps-dev): update dev dependencies`) | ✅ |
68
+ | `devDependencies` | minor / patch / digest / pin | one monthly `tooling` PR, shared with `github-actions` (`ci(deps-dev): ...`) | ✅ |
69
+ | `devDependencies` | **major** | individual PR (`chore(deps-dev): ...`) | ✅ attempted — if CI fails, the PR stays open for review |
70
70
  | `dependencies` / `peerDependencies` | **patch** | individual PR (`chore(deps): ...`) | ✅ |
71
71
  | `dependencies` / `peerDependencies` | **minor / major** | individual PR (`chore(deps): ...`) | ❌ awaits review |
72
- | `github-actions` | patch / minor / digest / pin | individual PR | ✅ |
73
- | `github-actions` | major | individual PR | ❌ awaits review |
74
- | Lockfile maintenance (transitive refresh of `pnpm-lock.yaml`) | weekly | `Refresh ... (chore(deps-dev))` | ✅ |
72
+ | `github-actions` | patch / minor / digest / pin | the monthly `tooling` PR | ✅ |
73
+ | `github-actions` | major | individual PR (`ci(deps): ...`) | ❌ awaits review |
74
+ | `pnpm` (`packageManager` / `engines`) | minor / patch / digest / pin | individual PR (`chore(deps): ...`) | ✅ |
75
+ | `pnpm` | major | individual PR (`chore(deps): ...`) | ❌ awaits review |
76
+ | Lockfile maintenance (transitive refresh of `pnpm-lock.yaml`) | Mondays | `Refresh ... (chore(deps-dev))` | ✅ |
75
77
 
76
78
  Renovate PR bodies all link back to MKPL-1055 via `prBodyNotes`.
77
79
 
78
- ### Auto-merge
79
-
80
- `main` requires `quality-checks` + `release` status checks and a CODEOWNERS review. The `leaflink-automation` account (whose PAT Renovate uses) is in `main`'s `bypass_pull_request_allowances`, but Renovate itself won't call the merge API while the PR shows as `BLOCKED` in GitHub's API — even though the bypass would let it through.
81
-
82
- To work around this, `.github/workflows/renovate-merge.yml` performs the merge on Renovate's behalf:
80
+ Neither `ci` nor `chore` commits trigger a release, so dependency merges never publish a package version on their own — the bumped deps ship with the next `feat`/`fix`/`perf`/`revert` release.
83
81
 
84
- 1. Renovate creates the PR. Any rule with `automerge: true` adds `addLabels: ['automerge']`, so the label is the single source of truth for "Renovate intended to auto-merge this."
85
- 2. `PR Quality Checks` and `Release` run on the PR.
86
- 3. When either completes, the `Renovate Merge` workflow is triggered via `workflow_run`. It:
87
- - filters to PRs authored by `leaflink-automation` with the `automerge` label,
88
- - asserts both required checks are present and successful,
89
- - calls the merge API authenticated as `leaflink-automation`.
90
- 4. Because the user is on the bypass list, the merge call succeeds despite `BLOCKED` status.
82
+ ### Auto-merge
91
83
 
92
- Human PRs are unaffected — they still require CODEOWNERS review.
84
+ Renovate uses **GitHub-native auto-merge** (`platformAutomerge: true`). `main` requires the `quality-checks` + `release` status checks and a CODEOWNERS review; the terraform-managed default-branch ruleset exempts `leaflink-automation` (whose PAT Renovate uses) from the review requirement, so an automerge PR no longer shows as `BLOCKED` and lands as soon as both checks pass. Human PRs are unaffected — they still require CODEOWNERS review.
93
85
 
94
- The required-checks list in `renovate-merge.yml` (`REQUIRED_CHECKS`) is hard-coded and must stay in sync with branch protection on `main`.
86
+ > Historical note: a custom `renovate-merge.yml` workflow used to perform merges on Renovate's behalf to work around the `BLOCKED` quirk. It was removed in #227 once the ruleset bypass made native auto-merge viable.
95
87
 
96
88
  ### Where to look
97
89
 
98
- - **Dependency Dashboard issue** (auto-created by Renovate, label `dependencies`) — single source of truth for what Renovate sees, what it skipped, and why.
90
+ - **Dependency Dashboard issue** (auto-created by Renovate, label `dependencies`) — single source of truth for what Renovate sees, what it's withholding (age gate), what it skipped, and why.
99
91
  - **Workflow runs** for `Renovate` in the Actions tab — `workflow_dispatch` with `logLevel: debug` to debug Renovate itself.
100
- - **Workflow runs** for `Renovate Merge` in the Actions tab — shows which PRs were merged or skipped (with reason) when CI completed. `workflow_dispatch` for manual recovery.
101
92
  - **`config:recommended`** is the base preset; any unspecified behavior comes from there.
102
93
 
103
94
  ## Usage
@@ -324,6 +315,33 @@ const mockProducts = generateProducts(10, { cases: 25 });
324
315
 
325
316
  In order to mock API endpoints that your tests interact with, you can get a set of mocking functions from `createMockApiUtils`.
326
317
 
318
+ These utilities use **MSW 3** and require Node.js 24 or newer (this package's existing minimum).
319
+ Consumers upgrading from MSW 2 must also migrate their server setup and handlers;
320
+ see the [MSW 2.x to 3.x migration guide](https://mswjs.io/docs/migrations/2.x-to-3.x).
321
+ Import HTTP APIs from `msw/http` and use `onUnhandledFrame` instead of `onUnhandledRequest`:
322
+
323
+ ```ts
324
+ // server.ts
325
+ import { setupServer } from 'msw/node';
326
+
327
+ export default setupServer();
328
+ ```
329
+
330
+ ```ts
331
+ // In a test suite using the native fetch API:
332
+ import { afterAll, afterEach, beforeAll } from 'vitest';
333
+ import server from './server.ts';
334
+
335
+ beforeAll(() => server.listen({ onUnhandledFrame: 'error' }));
336
+ afterEach(() => server.resetHandlers());
337
+ afterAll(() => server.close());
338
+ ```
339
+
340
+ The optional `setup-env` entrypoint stubs `fetch` before each test. For tests that
341
+ need MSW to intercept `fetch`, restore the native fetch implementation before
342
+ calling `server.listen()` in `beforeEach`, and close the server in `afterEach`.
343
+ Do not replace MSW's intercepted fetch with a mock.
344
+
327
345
  ```ts
328
346
  import { createMockApiUtils } from '@leaflink/dom-testing-utils';
329
347
  import yourServer from './server.ts';
@@ -339,7 +357,14 @@ const {
339
357
  There are two flavors of mocking utility functions:
340
358
 
341
359
  1. mock{VERB}Data - mocks response with a singular data object
342
- 2. mock{VERB}Endpoint - mocks a response endpoint with a function like msw's [Response Resolver](https://mswjs.io/docs/getting-started/mocks/rest-api#response-resolver)
360
+ 2. mock{VERB}Endpoint - mocks a response endpoint with an MSW [HTTP response resolver](https://mswjs.io/docs/api/http#resolver-argument)
361
+
362
+ Both flavors support GET, POST, PUT, DELETE, and PATCH. The generic
363
+ `mockEndpointData(url, data, method, options?)` and
364
+ `mockEndpoint(url, resolver, method, options?)` helpers also accept `head`,
365
+ `options`, and `all`. The optional handler options (for example, `{ once: true }`)
366
+ are forwarded to MSW unchanged. New handlers override earlier handlers for the
367
+ same endpoint until `server.resetHandlers()` is called.
343
368
 
344
369
  To mock an endpoint with simple return data
345
370
 
@@ -350,11 +375,13 @@ mockGetData('/relative-url', myMockObj);
350
375
  or you can customize the response
351
376
 
352
377
  ```ts
353
- mockGetEndpoint('/relative-url', (req, res, ctx) => {
354
- if (someConditional()) {
355
- HttpResponse.json({ foo: 'bar' });
356
- } else {
357
- HttpResponse.json({ foo: 'baz' });
378
+ import { HttpResponse } from 'msw/http';
379
+
380
+ mockGetEndpoint('/relative-url', ({ request }) => {
381
+ if (new URL(request.url).searchParams.has('alternate')) {
382
+ return HttpResponse.json({ foo: 'bar' });
358
383
  }
384
+
385
+ return HttpResponse.json({ foo: 'baz' });
359
386
  });
360
387
  ```
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,141 @@
1
+ import { http, HttpResponse } from 'msw/http';
2
+ import { setupServer } from 'msw/node';
3
+ import { expectTypeOf } from 'vitest';
4
+ import { createMockApiUtils, mockEndpoints } from '../../index.js';
5
+ const nativeFetch = globalThis.fetch;
6
+ const url = new URL('/api/items', window.location.href).href;
7
+ const server = setupServer(http.get(url, () => HttpResponse.json({ source: 'initial' })));
8
+ const utils = createMockApiUtils(server);
9
+ const verbs = ['get', 'post', 'put', 'delete', 'patch'];
10
+ const methods = [
11
+ 'get',
12
+ 'post',
13
+ 'put',
14
+ 'delete',
15
+ 'patch',
16
+ 'head',
17
+ 'options',
18
+ 'all',
19
+ ];
20
+ const dataHelpers = {
21
+ get: utils.mockGetData,
22
+ post: utils.mockPostData,
23
+ put: utils.mockPutData,
24
+ delete: utils.mockDeleteData,
25
+ patch: utils.mockPatchData,
26
+ };
27
+ const endpointHelpers = {
28
+ get: utils.mockGetEndpoint,
29
+ post: utils.mockPostEndpoint,
30
+ put: utils.mockPutEndpoint,
31
+ delete: utils.mockDeleteEndpoint,
32
+ patch: utils.mockPatchEndpoint,
33
+ };
34
+ beforeEach(() => {
35
+ // setup-env stubs fetch before each test; let MSW intercept the native implementation instead.
36
+ vi.stubGlobal('fetch', nativeFetch);
37
+ server.listen({ onUnhandledFrame: 'error' });
38
+ });
39
+ afterEach(() => {
40
+ server.resetHandlers();
41
+ server.close();
42
+ });
43
+ it('preserves the mockEndpoints compatibility export', () => {
44
+ expect(mockEndpoints).toBe(createMockApiUtils);
45
+ });
46
+ it.each(methods)('registers a %s data handler', async (method) => {
47
+ const data = { id: 1, name: 'Item' };
48
+ utils.mockEndpointData(url, data, method);
49
+ const response = await fetch(url, { method: method === 'all' ? 'POST' : method.toUpperCase() });
50
+ expect(response.status).toBe(200);
51
+ expect(response.headers.get('content-type')).toBe('application/json');
52
+ if (method === 'head') {
53
+ expect(await response.text()).toBe('');
54
+ }
55
+ else {
56
+ expect(await response.json()).toEqual(data);
57
+ }
58
+ });
59
+ it.each(methods)('registers a %s resolver handler', async (method) => {
60
+ utils.mockEndpoint(url, () => new HttpResponse(null, { status: 204, headers: { 'x-mocked': method } }), method);
61
+ const response = await fetch(url, { method: method === 'all' ? 'POST' : method.toUpperCase() });
62
+ expect(response.status).toBe(204);
63
+ expect(response.headers.get('x-mocked')).toBe(method);
64
+ expect(await response.text()).toBe('');
65
+ });
66
+ it.each(verbs)('returns JSON through the %s data helper', async (method) => {
67
+ const data = [{ id: 1 }, { id: 2 }];
68
+ dataHelpers[method]('/api/items', data);
69
+ const response = await fetch(url, { method: method.toUpperCase() });
70
+ expect(response.status).toBe(200);
71
+ expect(await response.json()).toEqual(data);
72
+ });
73
+ it.each(verbs)('supports asynchronous responses through the %s endpoint helper', async (method) => {
74
+ endpointHelpers[method]('/api/items/:id', async ({ request, params }) => {
75
+ const data = method === 'get' ? undefined : await request.json();
76
+ return HttpResponse.json({ id: params.id, method: request.method, data, query: new URL(request.url).searchParams.get('q') }, { status: 201 });
77
+ });
78
+ const data = { name: 'Updated item' };
79
+ const response = await fetch(`${url}/42?q=search`, {
80
+ method: method.toUpperCase(),
81
+ ...(method !== 'get' && { body: JSON.stringify(data), headers: { 'content-type': 'application/json' } }),
82
+ });
83
+ expect(response.status).toBe(201);
84
+ expect(await response.json()).toEqual({
85
+ id: '42',
86
+ method: method.toUpperCase(),
87
+ ...(method !== 'get' && { data }),
88
+ query: 'search',
89
+ });
90
+ });
91
+ it.each(verbs)('forwards once through the %s data helper', async (method) => {
92
+ dataHelpers[method](url, { source: 'fallback' });
93
+ dataHelpers[method](url, { source: 'once' }, { once: true });
94
+ const first = await fetch(url, { method: method.toUpperCase() });
95
+ const second = await fetch(url, { method: method.toUpperCase() });
96
+ expect(await first.json()).toEqual({ source: 'once' });
97
+ expect(await second.json()).toEqual({ source: 'fallback' });
98
+ });
99
+ it.each(verbs)('forwards once through the %s endpoint helper', async (method) => {
100
+ endpointHelpers[method](url, () => HttpResponse.json({ source: 'fallback' }));
101
+ endpointHelpers[method](url, () => HttpResponse.json({ source: 'once' }), { once: true });
102
+ const first = await fetch(url, { method: method.toUpperCase() });
103
+ const second = await fetch(url, { method: method.toUpperCase() });
104
+ expect(await first.json()).toEqual({ source: 'once' });
105
+ expect(await second.json()).toEqual({ source: 'fallback' });
106
+ });
107
+ it('resets runtime overrides to the initial server handlers', async () => {
108
+ utils.mockGetData(url, { source: 'override' });
109
+ const overridden = await fetch(url);
110
+ expect(await overridden.json()).toEqual({ source: 'override' });
111
+ server.resetHandlers();
112
+ const reset = await fetch(url);
113
+ expect(await reset.json()).toEqual({ source: 'initial' });
114
+ });
115
+ it.each([{ data: null }, { data: false }, { data: 0 }, { data: 'text' }, { data: [1, 2] }])('serializes JSON data $data without changing its value', async ({ data }) => {
116
+ utils.mockGetData(url, data);
117
+ const response = await fetch(url);
118
+ expect(await response.json()).toEqual(data);
119
+ });
120
+ it('allows an empty response body', async () => {
121
+ utils.mockGetData(url, undefined);
122
+ const response = await fetch(url);
123
+ expect(response.status).toBe(200);
124
+ expect(await response.text()).toBe('');
125
+ });
126
+ it('preserves typed path parameters, request bodies and response bodies', async () => {
127
+ utils.mockPostEndpoint(`${url}/:id`, async ({ request, params }) => {
128
+ const body = await request.json();
129
+ expectTypeOf(params).toEqualTypeOf();
130
+ expectTypeOf(body).toEqualTypeOf();
131
+ return HttpResponse.json({ id: params.id, name: body.name });
132
+ });
133
+ const response = await fetch(`${url}/42`, {
134
+ method: 'POST',
135
+ body: JSON.stringify({ name: 'Typed item' }),
136
+ headers: { 'content-type': 'application/json' },
137
+ });
138
+ expect(response.status).toBe(200);
139
+ expect(await response.json()).toEqual({ id: '42', name: 'Typed item' });
140
+ });
141
+ //# sourceMappingURL=mockEndpoints.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockEndpoints.spec.js","sourceRoot":"src/","sources":["utils/__tests__/mockEndpoints.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGnE,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC;AACrC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;AAC7D,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1F,MAAM,KAAK,GAAG,kBAAk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M,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC"}
@@ -1,17 +1,18 @@
1
- import { type DefaultBodyType, http, type HttpRequestResolverExtras, type PathParams, type RequestHandlerOptions, type ResponseResolver } from 'msw';
2
- import { SetupServer } from 'msw/node';
1
+ import { type DefaultBodyType, type PathParams, type RequestHandlerOptions } from 'msw';
2
+ import { http, type HttpResponseResolver } from 'msw/http';
3
+ import { type SetupServer } from 'msw/node';
3
4
  export type RestMethod = keyof typeof http;
4
5
  export default function createMockApiUtils(server: SetupServer): {
5
6
  mockEndpointData: <ResponseBody extends DefaultBodyType = undefined>(url: string, responseData: ResponseBody, method: RestMethod, options?: RequestHandlerOptions) => void;
6
- mockEndpoint: <Params extends PathParams<keyof Params> = PathParams, RequestBodyType extends DefaultBodyType = DefaultBodyType, ResponseBodyType extends DefaultBodyType = undefined>(relativeUrl: string, resolver: ResponseResolver<HttpRequestResolverExtras<Params>, RequestBodyType, ResponseBodyType>, method: RestMethod, options?: RequestHandlerOptions) => void;
7
- mockGetData: (url: string, responseData: any, options?: RequestHandlerOptions) => void;
8
- mockPostData: (url: string, responseData: any, options?: RequestHandlerOptions) => void;
9
- mockPutData: (url: string, responseData: any, options?: RequestHandlerOptions) => void;
10
- mockDeleteData: (url: string, responseData: any, options?: RequestHandlerOptions) => void;
11
- mockPatchData: (url: string, responseData: any, options?: RequestHandlerOptions) => void;
12
- mockGetEndpoint: (url: string, resolver: ResponseResolver<HttpRequestResolverExtras<PathParams>, DefaultBodyType, undefined>, options?: RequestHandlerOptions) => void;
13
- mockPostEndpoint: (url: string, resolver: ResponseResolver<HttpRequestResolverExtras<PathParams>, DefaultBodyType, undefined>, options?: RequestHandlerOptions) => void;
14
- mockPutEndpoint: (url: string, resolver: ResponseResolver<HttpRequestResolverExtras<PathParams>, DefaultBodyType, undefined>, options?: RequestHandlerOptions) => void;
15
- mockDeleteEndpoint: (url: string, resolver: ResponseResolver<HttpRequestResolverExtras<PathParams>, DefaultBodyType, undefined>, options?: RequestHandlerOptions) => void;
16
- mockPatchEndpoint: (url: string, resolver: ResponseResolver<HttpRequestResolverExtras<PathParams>, DefaultBodyType, undefined>, options?: RequestHandlerOptions) => void;
7
+ mockEndpoint: <Params extends PathParams<keyof Params> = PathParams, RequestBodyType extends DefaultBodyType = DefaultBodyType, ResponseBodyType extends DefaultBodyType = undefined>(relativeUrl: string, resolver: HttpResponseResolver<Params, RequestBodyType, ResponseBodyType>, method: RestMethod, options?: RequestHandlerOptions) => void;
8
+ mockGetData: <ResponseBody extends DefaultBodyType = undefined>(url: string, responseData: ResponseBody, options?: RequestHandlerOptions) => void;
9
+ mockPostData: <ResponseBody extends DefaultBodyType = undefined>(url: string, responseData: ResponseBody, options?: RequestHandlerOptions) => void;
10
+ mockPutData: <ResponseBody extends DefaultBodyType = undefined>(url: string, responseData: ResponseBody, options?: RequestHandlerOptions) => void;
11
+ mockDeleteData: <ResponseBody extends DefaultBodyType = undefined>(url: string, responseData: ResponseBody, options?: RequestHandlerOptions) => void;
12
+ mockPatchData: <ResponseBody extends DefaultBodyType = undefined>(url: string, responseData: ResponseBody, options?: RequestHandlerOptions) => void;
13
+ mockGetEndpoint: <Params extends PathParams<keyof Params> = PathParams, RequestBodyType extends DefaultBodyType = DefaultBodyType, ResponseBodyType extends DefaultBodyType = undefined>(url: string, resolver: HttpResponseResolver<Params, RequestBodyType, ResponseBodyType>, options?: RequestHandlerOptions) => void;
14
+ mockPostEndpoint: <Params extends PathParams<keyof Params> = PathParams, RequestBodyType extends DefaultBodyType = DefaultBodyType, ResponseBodyType extends DefaultBodyType = undefined>(url: string, resolver: HttpResponseResolver<Params, RequestBodyType, ResponseBodyType>, options?: RequestHandlerOptions) => void;
15
+ mockPutEndpoint: <Params extends PathParams<keyof Params> = PathParams, RequestBodyType extends DefaultBodyType = DefaultBodyType, ResponseBodyType extends DefaultBodyType = undefined>(url: string, resolver: HttpResponseResolver<Params, RequestBodyType, ResponseBodyType>, options?: RequestHandlerOptions) => void;
16
+ mockDeleteEndpoint: <Params extends PathParams<keyof Params> = PathParams, RequestBodyType extends DefaultBodyType = DefaultBodyType, ResponseBodyType extends DefaultBodyType = undefined>(url: string, resolver: HttpResponseResolver<Params, RequestBodyType, ResponseBodyType>, options?: RequestHandlerOptions) => void;
17
+ mockPatchEndpoint: <Params extends PathParams<keyof Params> = PathParams, RequestBodyType extends DefaultBodyType = DefaultBodyType, ResponseBodyType extends DefaultBodyType = undefined>(url: string, resolver: HttpResponseResolver<Params, RequestBodyType, ResponseBodyType>, options?: RequestHandlerOptions) => void;
17
18
  };
@@ -1,4 +1,4 @@
1
- import { http, HttpResponse, } from 'msw';
1
+ import { http, HttpResponse } from 'msw/http';
2
2
  export default function createMockApiUtils(server) {
3
3
  /**
4
4
  * Mock endpoint with data
@@ -1 +1 @@
1
- {"version":3,"file":"mockEndpoints.js","sourceRoot":"src/","sources":["utils/mockEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,EAEJ,YAAY,GAIb,MAAM,KAAK,CAAC;AAKb,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,MAAmB;IAC5D;;OAEG;IACH,MAAM,gBAAgB,GAAG,CACvB,GAAW,EACX,YAA0B,EAC1B,MAAkB,EAClB,OAA+B,EAC/B,EAAE;QACF,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IAChF,CAAC,CAAC;IAEF;;OAEG;IACH,MAAM,YAAY,GAAG,CAKnB,WAAmB,EACnB,QAAgG,EAChG,MAAkB,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Q,CAAC;QAC1C,aAAa,EAAE,gBAAgB,CAAC,OAAO,CAAC;QACxC,eAAe,EAAE,oBAAoB,CAAC,KAAK,CAAC;QAC5C,gBAAgB,EAAE,oBAAoB,CAAC,MAAM,CAAC;QAC9C,eAAe,EAAE,oBAAoB,CAAC,KAAK,CAAC;QAC5C,kBAAkB,EAAE,oBAAoB,CAAC,QAAQ,CAAC;QAClD,iBAAiB,EAAE,oBAAoB,CAAC,OAAO,CAAC;KACjD,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@leaflink/dom-testing-utils",
3
- "version": "5.3.2",
3
+ "version": "6.0.0",
4
4
  "description": "Frontend DOM testing utilities",
5
- "packageManager": "pnpm@11.1.2",
5
+ "packageManager": "pnpm@12.6.0",
6
6
  "engines": {
7
7
  "node": ">=24",
8
- "pnpm": ">=11"
8
+ "pnpm": ">=12"
9
9
  },
10
10
  "exports": {
11
11
  ".": {
@@ -41,21 +41,21 @@
41
41
  },
42
42
  "license": "MIT",
43
43
  "dependencies": {
44
- "msw": "^2.14.6"
44
+ "msw": "^3.0.3"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@leaflink/eslint-config": "^5.3.0",
48
48
  "@types/node": "^25.9.0",
49
- "@vitest/coverage-v8": "^4.1.6",
49
+ "@vitest/coverage-v8": "^5.0.0",
50
50
  "commitlint": "^21.0.0",
51
- "conventional-changelog-conventionalcommits": "^9.3.0",
51
+ "conventional-changelog-conventionalcommits": "^9.3.1",
52
52
  "eslint": "^10.0.0",
53
- "jsdom": "^29.1.1",
53
+ "jsdom": "^30.0.0",
54
54
  "semantic-release": "^25.0.3",
55
55
  "stylelint": "^17.11.0",
56
56
  "typescript": "^6.0.0",
57
57
  "vite": "^8.0.13",
58
- "vitest": "^4.1.6"
58
+ "vitest": "^5.0.0"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@testing-library/dom": "^7 || ^8 || ^9 || ^10",