Skip to content

Commit

Permalink
Merge pull request #1130 from cag/quell-jest
Browse files Browse the repository at this point in the history
Use CJS modules to quell Jest
  • Loading branch information
kadenzipfel authored Sep 29, 2020
2 parents b316506 + e8bd3bc commit 38f60d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@
"pre-push": "yarn lint:check"
}
},
"jest": {
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\](?!(contract-proxy-kit))[/\\\\].*\\.(js|jsx|mjs|cjs|ts|tsx)$",
"^.+\\.module\\.(css|sass|scss)$"
]
},
"browserslist": {
"production": [
">0.2%",
Expand Down
2 changes: 1 addition & 1 deletion app/src/hooks/useCpk.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CPK from 'contract-proxy-kit'
import CPK from 'contract-proxy-kit/lib/esm'
import EthersAdapter from 'contract-proxy-kit/lib/esm/ethLibAdapters/EthersAdapter'
import { ethers } from 'ethers'
import { useEffect, useState } from 'react'
Expand Down
2 changes: 1 addition & 1 deletion app/src/services/cpk.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CPK from 'contract-proxy-kit'
import CPK from 'contract-proxy-kit/lib/esm'
import EthersAdapter from 'contract-proxy-kit/lib/esm/ethLibAdapters/EthersAdapter'
import { ethers } from 'ethers'
import { TransactionReceipt, Web3Provider } from 'ethers/providers'
Expand Down

0 comments on commit 38f60d5

Please sign in to comment.