-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run Jest tests with okta-angular 6.0.0 #110
Comments
One workaround for this is to add export default {
...
transformIgnorePatterns: ['node_modules/(?!.*.mjs$|@okta/okta-angular)'],
...
} However, we're wondering if an official solution/adaptation can be applied, e.g. build the library to |
Thanks for the report, we will investigate this Internal Ref: OKTA-551971 |
@abaran30 Can you post your jest config please? I am able to run Jest tests with the following config (using // jest.config.js
export default {
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
globalSetup: 'jest-preset-angular/global-setup',
transformIgnorePatterns: [
],
}; // setup-jest.ts
import 'jest-preset-angular/setup-jest'; |
@denysoblohin-okta my apologies, recently did a repo cleanup and forgot about this reproduction of the issue... Reproduction steps:
|
@abaran30 Next major version of okta-angular will include using |
@denysoblohin-okta any eta for this? |
Describe the bug?
After upgrading to okta-angular 6.0.0, although applications with Okta auth continue to work, unit tests via Jest (with jest-preset-angular) fail to run.
What is expected to happen?
Unit tests via Jest continue to run and pass.
What is the actual behavior?
Unit tests fail to run with the following error:
Reproduction Steps?
git checkout chore/okta-6-jest
(project is set up only to reproduce the test issue)npm ci
npx nx run my-app:test
SDK Versions
@okta/okta-angular: 6.0.0
@okta/okta-auth-js: 7.0.1
Nx version 15.0.13
Angular version ~14.2.0
Jest version 28.1.3
Execution Environment
Node version 18.12.0
npm version 8.19.2
OS version macOS Monterey (12.5.1)
The text was updated successfully, but these errors were encountered: