Skip to content

Commit

Permalink
chore: enable jest globals
Browse files Browse the repository at this point in the history
  • Loading branch information
Wroud committed Aug 6, 2024
1 parent ee90d58 commit 5d7702d
Show file tree
Hide file tree
Showing 16 changed files with 2 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity';
import { coreLocalizationManifest } from '@cloudbeaver/core-localization';
Expand Down
1 change: 0 additions & 1 deletion webapp/packages/core-blocks/src/ErrorMessage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';
import { screen, waitFor } from '@testing-library/react';

import { coreEventsManifest } from '@cloudbeaver/core-events';
Expand Down
1 change: 0 additions & 1 deletion webapp/packages/core-blocks/src/Icon.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';
import { render, screen } from '@testing-library/react';

import { Icon } from './Icon';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreBrowserManifest } from '@cloudbeaver/core-browser';
import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity';
Expand Down
5 changes: 2 additions & 3 deletions webapp/packages/core-cli/configs/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
},
// passWithNoTests: true,
setupFiles: [require.resolve('fake-indexeddb/auto'), require.resolve('../tests/setup.js')],
setupFilesAfterEnv: ['@testing-library/jest-dom'],
setupFilesAfterEnv: ['@testing-library/jest-dom/jest-globals'],
transform: {
'\\.jsx?$': [require.resolve('@swc/jest')],
},
Expand All @@ -36,6 +36,5 @@ module.exports = {
// https://mswjs.io/docs/migrations/1.x-to-2.x#cannot-find-module-mswnode-jsdom
customExportConditions: [''],
},
// unset all global variables
globals: {},
injectGlobals: false,
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity';
import { coreLocalizationManifest } from '@cloudbeaver/core-localization';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreAuthenticationManifest } from '@cloudbeaver/core-authentication';
import { mockAuthentication } from '@cloudbeaver/core-authentication/dist/__custom_mocks__/mockAuthentication';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity';
import { coreLocalizationManifest } from '@cloudbeaver/core-localization';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { SyncExecutor } from '@cloudbeaver/core-executor';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity';
import { coreEventsManifest } from '@cloudbeaver/core-events';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreAdministrationManifest } from '@cloudbeaver/core-administration';
import { coreAppManifest } from '@cloudbeaver/core-app';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { beforeAll, describe, expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreAdministrationManifest } from '@cloudbeaver/core-administration';
import { coreAppManifest } from '@cloudbeaver/core-app';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreAppManifest } from '@cloudbeaver/core-app';
import { coreAuthenticationManifest } from '@cloudbeaver/core-authentication';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { describe, expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreAdministrationManifest } from '@cloudbeaver/core-administration';
import { coreAppManifest } from '@cloudbeaver/core-app';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity';
import { coreLocalizationManifest } from '@cloudbeaver/core-localization';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* you may not use this file except in compliance with the License.
*/
import { expect, test } from '@jest/globals';
import '@testing-library/jest-dom';

import { coreAdministrationManifest } from '@cloudbeaver/core-administration';
import { coreAppManifest } from '@cloudbeaver/core-app';
Expand Down

0 comments on commit 5d7702d

Please sign in to comment.