working tests
This commit is contained in:
parent
f3e93bae19
commit
dd16f42995
@ -13,9 +13,9 @@ const config: Config = {
|
|||||||
coverageProvider: "v8",
|
coverageProvider: "v8",
|
||||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
||||||
testEnvironment: "jsdom",
|
testEnvironment: "jsdom",
|
||||||
transform: {
|
// transform: {
|
||||||
'^.+\\.(ts|tsx|js|jsx)$': 'babel-jest',
|
// '^.+\\.(ts|tsx|js|jsx)$': 'babel-jest',
|
||||||
},
|
// },
|
||||||
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx', 'js', 'jsx'],
|
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx', 'js', 'jsx'],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1 +1,14 @@
|
|||||||
|
import { jest } from '@jest/globals';
|
||||||
import '@testing-library/jest-dom';
|
import '@testing-library/jest-dom';
|
||||||
|
import mockedConfig from './bro.config.js'
|
||||||
|
|
||||||
|
jest.mock('@brojs/cli', () => {
|
||||||
|
return {
|
||||||
|
getNavigations() {
|
||||||
|
return mockedConfig.navigations
|
||||||
|
},
|
||||||
|
getNavigationsValue(key) {
|
||||||
|
return mockedConfig.navigations[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user