1
0
Fork 0
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:
Chaim Lev-Ari 2024-01-04 16:57:21 +07:00 committed by GitHub
parent ecd603db8c
commit 400a80c07d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 2602 additions and 1669 deletions

View file

@ -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} />