Skip to content

Commit

Permalink
chore: move mock to setupTests.ts #2179
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-mihok authored and mturoci committed Nov 16, 2023
1 parent fd76177 commit ed9bc6e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions ui/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ module.exports = {
testEnvironment: "jsdom",
transformIgnorePatterns: [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
// "^.+\\.module\\.(css|sass|scss)$"
],
modulePaths: [],
moduleNameMapper: {
"^react-native$": "react-native-web",
'^d3$': '<rootDir>/node_modules/d3/dist/d3.min.js',
'\\.(css)$': '<rootDir>/src/styleMock.js'
},
moduleFileExtensions: [
"web.js",
Expand Down
2 changes: 2 additions & 0 deletions ui/src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jest.mock('d3', () => ({
pie: () => ({ value: () => () => [] }),
}))
jest.mock('d3-interpolate', () => ({ extent: () => '' }))
jest.mock('./markdown.css', () => '')


const icons = Object.entries(Icons).reduce((acc, [iconName, iconComponent]) => {
if ('displayName' in iconComponent) acc[iconName.slice(0, -4)] = React.createElement(iconComponent as React.FC)
Expand Down
1 change: 0 additions & 1 deletion ui/src/styleMock.js

This file was deleted.

0 comments on commit ed9bc6e

Please sign in to comment.