Files
self/app/jest.config.cjs
Aaron DeRuvo 25634e06dc create nice structure for the mobile sdk (#1177)
* create nice structure for the mobile sdk

* spv

* actually dont touch what we dont understand

* fix metro

* fix pretty

* fix types on app and imrpove names

* sneek in actually checking the types in the mobile app.

* not yet

* fix jest imports and name test better
2025-10-02 09:34:22 +02:00

43 lines
2.0 KiB
JavaScript

// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
// SPDX-License-Identifier: BUSL-1.1
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
module.exports = {
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
transformIgnorePatterns: [
'node_modules/(?!(react-native|@react-native|@react-navigation|@react-native-community|@segment/analytics-react-native|@openpassport|react-native-keychain|react-native-check-version|react-native-nfc-manager|react-native-passport-reader|react-native-gesture-handler|uuid|@stablelib|@react-native-google-signin|react-native-cloud-storage|@react-native-clipboard|@react-native-firebase|@selfxyz|@sentry|@anon-aadhaar)/)',
],
setupFiles: ['<rootDir>/jest.setup.js'],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$',
moduleNameMapper: {
'^@env$': '<rootDir>/tests/__setup__/@env.js',
'\\.svg$': '<rootDir>/tests/__setup__/svgMock.js',
'^@/(.*)$': '<rootDir>/src/$1',
'^@$': '<rootDir>/src',
'^@tests/(.*)$': '<rootDir>/tests/src/$1',
'^@tests$': '<rootDir>/tests/src',
'^@selfxyz/mobile-sdk-alpha$':
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/index.cjs',
'^@selfxyz/mobile-sdk-alpha/onboarding/(.*)$':
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/flows/onboarding/$1.cjs',
'^@selfxyz/mobile-sdk-alpha/disclosing/(.*)$':
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/flows/disclosing/$1.cjs',
'^@selfxyz/mobile-sdk-alpha/(.*)$':
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/$1.cjs',
// Fix snarkjs resolution for @anon-aadhaar/core
'^snarkjs$': '<rootDir>/../circuits/node_modules/snarkjs/build/main.cjs',
// Fix ffjavascript resolution for snarkjs dependencies
'^ffjavascript$':
'<rootDir>/../circuits/node_modules/ffjavascript/build/main.cjs',
// Fix @anon-aadhaar/core resolution
'^@anon-aadhaar/core$':
'<rootDir>/../common/node_modules/@anon-aadhaar/core/dist/index.js',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
},
};