fix(ui): stub unused modules [EE-6583] (#11006)

pull/11007/head
Chaim Lev-Ari 10 months ago committed by GitHub
parent 69c06bc756
commit 8f0f9d7aaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1 +0,0 @@
export function loadProgressBar() {}

@ -2,7 +2,6 @@ import toastr from 'toastr';
import { notifyError, notifySuccess, notifyWarning } from './notifications';
vi.mock('toastr');
vi.spyOn(console, 'error').mockImplementation(() => vi.fn());
afterEach(() => {

@ -1,5 +0,0 @@
import 'regenerator-runtime/runtime';
export default function setupTests() {
// pass
}

@ -0,0 +1,8 @@
// this file takes care of stubbing modules that are not tested, like
// axios-progress-bar
// toastr
vi.mock('toastr');
vi.mock('axios-progress-bar', () => ({
loadProgressBar() {},
}));

@ -7,10 +7,7 @@ export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: [
'./app/setup-tests/global-setup.js',
'./app/setup-tests/setup-msw.ts',
],
setupFiles: ['./app/setup-tests/setup-msw.ts', './app/setup-tests/stub-modules.ts'],
coverage: {
reporter: ['text', 'html'],
exclude: ['node_modules/', 'app/setup-tests/global-setup.js'],

@ -7863,30 +7863,10 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001181:
version "1.0.30001451"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001451.tgz"
integrity sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==
caniuse-lite@^1.0.30001449:
version "1.0.30001487"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001487.tgz#d882d1a34d89c11aea53b8cdc791931bdab5fe1b"
integrity sha512-83564Z3yWGqXsh2vaH/mhXfEM0wX+NlBCm1jYHOb97TrTWJEmPTccZgeLTPBUUb0PNVo+oomb7wkimZBIERClA==
caniuse-lite@^1.0.30001503:
version "1.0.30001515"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz#418aefeed9d024cd3129bfae0ccc782d4cb8f12b"
integrity sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA==
caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001541:
version "1.0.30001543"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001543.tgz#478a3e9dddbb353c5ab214b0ecb0dbed529ed1d8"
integrity sha512-qxdO8KPWPQ+Zk6bvNpPeQIOH47qZSYdFZd6dXQzb2KzhnSXju4Kd7H1PkSJx6NICSMgo/IhRZRhhfPTHYpJUCA==
caniuse-lite@^1.0.30001565:
version "1.0.30001572"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001572.tgz#1ccf7dc92d2ee2f92ed3a54e11b7b4a3041acfa0"
integrity sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001181, caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001503, caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001541, caniuse-lite@^1.0.30001565:
version "1.0.30001579"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz"
integrity sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==
capital-case@^1.0.4:
version "1.0.4"

Loading…
Cancel
Save