Skip to content

Commit

Permalink
test: simplify jest/babel setup
Browse files Browse the repository at this point in the history
was able to be simplified after solana-labs#149 was merged
  • Loading branch information
johnrees committed Dec 20, 2021
1 parent 246711d commit 1798546
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 800 deletions.
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
[
"next/babel",
{
"preset-react": {
"runtime": "automatic",
"importSource": "@emotion/react"
}
}
]
],
"plugins": ["@emotion/babel-plugin", "babel-plugin-macros"]
}
28 changes: 0 additions & 28 deletions babel.config.js

This file was deleted.

1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const directories = readdirSync(__dirname, { withFileTypes: true })

module.exports = {
roots: ['<rootDir>'],
testEnvironment: 'jsdom',
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'jsx'],
testPathIgnorePatterns: ['<rootDir>/(node_modules|.next)/'],
transformIgnorePatterns: ['/node_modules/.+\\.(ts|tsx)$'],
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"zustand": "^3.4.1"
},
"devDependencies": {
"@babel/preset-env": "^7.16.5",
"@emotion/babel-preset-css-prop": "^11.2.0",
"@testing-library/react": "^11.2.5",
"@types/jest": "^27.0.3",
Expand Down
3 changes: 3 additions & 0 deletions test/pages/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @jest-environment jsdom
*/
import React from 'react'
import Home from '../../pages/index'
import { render } from '@testing-library/react'
Expand Down
Loading

0 comments on commit 1798546

Please sign in to comment.