mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-08-09 16:24:55 +00:00
- testMatch now only picks up *.test/*.spec files so the i18n scripts (run via `yarn test:i18n`) are no longer globbed as empty suites - Allowlist react-native-flash-message for transform and map react-native-quick-crypto to a Node crypto shim, unblocking the 11 cashuDleq tests that load it transitively via @scure/bip32 - Remove orphaned storage.test.ts (module + async-storage dep gone) and the boilerplate App.test.tsx smoke test that mounted the full native tree Suite now: 12 suites / 136 tests passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 lines
811 B
JavaScript
17 lines
811 B
JavaScript
module.exports = {
|
|
preset: 'react-native',
|
|
// Only treat *.test/*.spec files as tests. The default preset glob also
|
|
// matches every .js file under __tests__, which would pull in the i18n
|
|
// scripts (missingTranslations.js etc.) that are run via `yarn test:i18n`.
|
|
testMatch: ['**/*.(test|spec).[jt]s?(x)'],
|
|
transformIgnorePatterns: [
|
|
'node_modules/(?!((jest-)?react-native|@react-native|@react-native-community|@cashu|@noble|@scure|react-native-flash-message)/)',
|
|
],
|
|
moduleNameMapper: {
|
|
'^@noble/hashes/utils$': '@noble/hashes/utils.js',
|
|
// quick-crypto's native module is unavailable under jest; route to a
|
|
// Node `crypto` shim so deps that import it at load time (e.g. bip32) work.
|
|
'^react-native-quick-crypto$': '<rootDir>/__mocks__/react-native-quick-crypto.js',
|
|
},
|
|
}
|