Skip to content

Commit

Permalink
chore: configure jest and babel
Browse files Browse the repository at this point in the history
  • Loading branch information
RenatoFranca committed Oct 9, 2020
1 parent 96bbb3f commit da18fbf
Show file tree
Hide file tree
Showing 7 changed files with 4,149 additions and 674 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["next/babel", "@babel/preset-typescript"]
}
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"env": {
"browser": true,
"es2021": true
"es2021": true,
"jest": true,
"node": true
},
"settings": {
"react": {
Expand Down
2 changes: 2 additions & 0 deletions .jest/setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import '@testing-library/jest-dom'
import 'jest-styled-components'
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
collectCoverage: true,
collectCoverageFrom: ['src/**/*.ts(x)'],
setupFilesAfterEnv: ['<rootDir>/.jest/setup.ts']
}
Loading

0 comments on commit da18fbf

Please sign in to comment.