Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,26 @@ default_screen_deployment_status:

Only screens set to `true` in this configuration file will be processed by the deployment workflow for Advanced Mode. This allows you to selectively roll out your custom screens.

<a id="testing"></a>

## Testing

This project uses [Jest](https://jestjs.io/) for unit and integration testing of screen components.

### Running Tests

To run the entire test suite:

```bash
npm test
```

Run per screens tests

```bash
npm test -- --testPathPatterns="<screen_name>"
```

<a id="technical-details"></a>

## 🔍 Technical Details
Expand Down
7 changes: 7 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
presets: [
'@babel/preset-typescript',
['@babel/preset-react', { runtime: 'automatic' }],
['@babel/preset-env', { targets: { node: 'current' } }],
],
};
16 changes: 16 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'jsdom',
transform: {
'^.+\\.(ts|tsx|js|jsx)$': 'babel-jest',
},
moduleNameMapper: {
// We need this wildcard mapper to help Jest resolve the non-standard
// sub-path exports of the Auth0 ACUL JS SDK before it can apply our manual mock.
'^@auth0/auth0-acul-js/(.*)$': '<rootDir>/node_modules/@auth0/auth0-acul-js/dist/$1/index.js',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'^@/(.*)$': '<rootDir>/src/$1',
},
// Allow transforming ESM modules from node_modules.
transformIgnorePatterns: ['/node_modules/(?!@auth0/auth0-acul-js/)'],
setupFilesAfterEnv: ['<rootDir>/src/test/setup.ts'],
};
Loading