mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
chore(deps): upgrade to msw v2 [EE-6489] (#10911)
This commit is contained in:
parent
ecd603db8c
commit
400a80c07d
19 changed files with 2602 additions and 1669 deletions
|
@ -1,6 +1,8 @@
|
|||
import { http, HttpResponse } from 'msw';
|
||||
|
||||
import { Tag, TagId } from '@/portainer/tags/types';
|
||||
import { renderWithQueryClient } from '@/react-tools/test-utils';
|
||||
import { server, rest } from '@/setup-tests/server';
|
||||
import { server } from '@/setup-tests/server';
|
||||
|
||||
import { TagSelector } from './TagSelector';
|
||||
|
||||
|
@ -49,7 +51,7 @@ async function renderComponent(
|
|||
} = {},
|
||||
tags: Tag[] = []
|
||||
) {
|
||||
server.use(rest.get('/api/tags', (_req, res, ctx) => res(ctx.json(tags))));
|
||||
server.use(http.get('/api/tags', () => HttpResponse.json(tags)));
|
||||
|
||||
const queries = renderWithQueryClient(
|
||||
<TagSelector value={value} allowCreate={allowCreate} onChange={onChange} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue