Skip to content

Commit

Permalink
fix: remove deprecated react-test-renderer (#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh authored Aug 22, 2024
1 parent 56ea517 commit 33d477d
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 61 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@types/jsdom": "21.1.7",
"@types/react": "18.3.4",
"@types/react-dom": "18.3.0",
"@types/react-test-renderer": "18.3.0",
"@types/uuid": "10.0.0",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
Expand All @@ -63,7 +62,6 @@
"prettier": "3.3.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-test-renderer": "18.3.1",
"ts-node": "10.9.2",
"tsc-alias": "1.8.10",
"typescript": "5.5.4",
Expand Down
2 changes: 1 addition & 1 deletion src/mutations/itemCategory.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { HttpMethod } from '@graasp/sdk';
import { SUCCESS_MESSAGES } from '@graasp/translations';

import { act } from '@testing-library/react';
import { StatusCodes } from 'http-status-codes';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { afterEach, describe, expect, it, vi } from 'vitest';

import {
Expand Down
2 changes: 1 addition & 1 deletion src/mutations/itemExport.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HttpMethod } from '@graasp/sdk';

import { act } from '@testing-library/react';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { afterEach, describe, expect, it, vi } from 'vitest';

import { mockMutation, setUpTest, waitForMutation } from '../../test/utils.js';
Expand Down
2 changes: 1 addition & 1 deletion src/mutations/itemFlag.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { FlagType, FolderItemFactory, HttpMethod } from '@graasp/sdk';
import { SUCCESS_MESSAGES } from '@graasp/translations';

import { act } from '@testing-library/react';
import { StatusCodes } from 'http-status-codes';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { afterEach, describe, expect, it, vi } from 'vitest';

import { ITEM_FLAGS, UNAUTHORIZED_RESPONSE } from '../../test/constants.js';
Expand Down
2 changes: 1 addition & 1 deletion src/mutations/itemGeolocation.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { HttpMethod } from '@graasp/sdk';
import { SUCCESS_MESSAGES } from '@graasp/translations';

import { act } from '@testing-library/react';
import { StatusCodes } from 'http-status-codes';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { v4 } from 'uuid';
import { afterEach, describe, expect, it, vi } from 'vitest';

Expand Down
2 changes: 1 addition & 1 deletion src/mutations/itemLike.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FolderItemFactory, HttpMethod, MemberFactory } from '@graasp/sdk';

import { act } from '@testing-library/react';
import { StatusCodes } from 'http-status-codes';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { afterEach, describe, expect, it, vi } from 'vitest';

import { ITEM_LIKES, UNAUTHORIZED_RESPONSE } from '../../test/constants.js';
Expand Down
2 changes: 1 addition & 1 deletion src/mutations/itemLogin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
} from '@graasp/sdk';
import { SUCCESS_MESSAGES } from '@graasp/translations';

import { act } from '@testing-library/react';
import { StatusCodes } from 'http-status-codes';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { afterEach, describe, expect, it, vi } from 'vitest';

import { ITEM_LOGIN_RESPONSE } from '../../test/constants.js';
Expand Down
2 changes: 1 addition & 1 deletion src/mutations/itemPublish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
PublicationStatus,
} from '@graasp/sdk';

import { act } from '@testing-library/react';
import { StatusCodes } from 'http-status-codes';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { afterEach, describe, expect, it, vi } from 'vitest';

import {
Expand Down
2 changes: 1 addition & 1 deletion src/mutations/itemTag.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
} from '@graasp/sdk';
import { SUCCESS_MESSAGES } from '@graasp/translations';

import { act } from '@testing-library/react';
import { StatusCodes } from 'http-status-codes';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { afterEach, describe, expect, it, vi } from 'vitest';

import { ITEM_TAGS, UNAUTHORIZED_RESPONSE } from '../../test/constants.js';
Expand Down
2 changes: 1 addition & 1 deletion src/mutations/itemValidation.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { HttpMethod } from '@graasp/sdk';

import { act } from '@testing-library/react';
import { StatusCodes } from 'http-status-codes';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { afterEach, describe, expect, it, vi } from 'vitest';

import {
Expand Down
2 changes: 1 addition & 1 deletion src/mutations/membership.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
} from '@graasp/sdk';
import { SUCCESS_MESSAGES } from '@graasp/translations';

import { act } from '@testing-library/react';
import { StatusCodes } from 'http-status-codes';
import nock from 'nock';
import { act } from 'react-test-renderer';
import { afterEach, describe, expect, it, vi } from 'vitest';

import {
Expand Down
Loading

0 comments on commit 33d477d

Please sign in to comment.