Skip to content

Commit

Permalink
Merge pull request #1116 from statisticsnorway/MIM-1890_setup_ts-jest…
Browse files Browse the repository at this point in the history
…_table

Part 2: Table Component
  • Loading branch information
johnnadeluy authored Jun 14, 2024
2 parents 9262b0c + 55fdaa0 commit c0bf8c5
Show file tree
Hide file tree
Showing 13 changed files with 4,027 additions and 1,526 deletions.
9 changes: 6 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
"airbnb",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors"
"plugin:import/errors",
"prettier"
],
"plugins": [
"@typescript-eslint",
"import"
"import",
"prettier"
],
"env": {
"browser": true,
Expand Down Expand Up @@ -70,7 +72,8 @@
"ts": "never",
"tsx": "never"
}
]
],
"prettier/prettier": ["warn"]
},
"globals": {
"document": false,
Expand Down
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"arrowParens": "always",
"printWidth": 120,
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"jsxSingleQuote": true,
"trailingComma": "es5"
}
17 changes: 10 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
collectCoverageFrom: [
'src/**/index.jsx',
'!<rootDir>/src/index.jsx',
'!<rootDir>/src/App.jsx',
'!<rootDir>/src/**/*stories.jsx',
'src/**/index.[tj]s?(x)',
'!<rootDir>/src/index.[tj]s?(x)',
'!<rootDir>/src/App.[tj]s?(x)',
'!<rootDir>/src/**/*stories.[tj]s?(x)',
'!<rootDir>/node_modules/',
'!<rootDir>/path/to/dir/',
],
Expand All @@ -21,9 +21,12 @@ module.exports = {
modulePaths: [
'<rootDir>/src/scripts/atoms',
],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.js'],
testMatch: ['**/*.test.jsx'],
transform: { '^.+\\.jsx?$': 'babel-jest' },
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
testMatch: ['**/*.test.[tj]s?(x)'],
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.tsx?$': 'ts-jest',
},
transformIgnorePatterns: ['<rootDir>/node_modules/'],
testEnvironment: 'jsdom',
};
Loading

0 comments on commit c0bf8c5

Please sign in to comment.