test(hooks): add unit tests for @asgardeo/react hooks to cover edge c… #382
pr-builder.yml
on: pull_request
Matrix: 🚧 Build
Matrix: ⬣ ESLint (STATIC ANALYSIS)
Matrix: 👾 Unit Test (TESTING)
Matrix: ʦ Typecheck (STATIC ANALYSIS)
Annotations
11 errors and 24 warnings
|
⬣ ESLint (STATIC ANALYSIS) (lts/*, latest)
Process completed with exit code 1.
|
|
src/__tests__/index.test.ts > @asgardeo/react-router > should export useReturnUrl:
packages/react-router/src/__tests__/index.test.ts#L39
AssertionError: expected undefined to be defined
❯ src/__tests__/index.test.ts:39:26
|
|
src/__tests__/index.test.ts > @asgardeo/react-router > should export useAuthGuard:
packages/react-router/src/__tests__/index.test.ts#L34
AssertionError: expected undefined to be defined
❯ src/__tests__/index.test.ts:34:26
|
|
src/__tests__/index.test.ts > @asgardeo/react-router > should export withAuthentication:
packages/react-router/src/__tests__/index.test.ts#L29
AssertionError: expected undefined to be defined
❯ src/__tests__/index.test.ts:29:32
|
|
src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.test.tsx > BaseOrganizationSwitcher RTL Support > should update icon flip when direction changes:
packages/react/src/components/primitives/Button/Button.styles.ts#L99
TypeError: Cannot read properties of undefined (reading 'fontSizes')
❯ src/components/primitives/Button/Button.styles.ts:99:49
❯ mountMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:6603:23
❯ Object.useMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:22924:18
❯ process.env.NODE_ENV.exports.useMemo ../../node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:1209:34
❯ useStyles src/components/primitives/Button/Button.styles.ts:50:10
❯ Button src/components/primitives/Button/Button.tsx:115:20
❯ Object.react-stack-bottom-frame ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:23863:20
❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:5529:22
❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:8645:19
❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10861:18
|
|
src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.test.tsx > BaseOrganizationSwitcher RTL Support > should not flip chevron icon in LTR mode:
packages/react/src/components/primitives/Button/Button.styles.ts#L99
TypeError: Cannot read properties of undefined (reading 'fontSizes')
❯ src/components/primitives/Button/Button.styles.ts:99:49
❯ mountMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:6603:23
❯ Object.useMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:22924:18
❯ process.env.NODE_ENV.exports.useMemo ../../node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:1209:34
❯ useStyles src/components/primitives/Button/Button.styles.ts:50:10
❯ Button src/components/primitives/Button/Button.tsx:115:20
❯ Object.react-stack-bottom-frame ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:23863:20
❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:5529:22
❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:8645:19
❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10861:18
|
|
src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.test.tsx > BaseOrganizationSwitcher RTL Support > should flip chevron icon in RTL mode:
packages/react/src/components/primitives/Button/Button.styles.ts#L99
TypeError: Cannot read properties of undefined (reading 'fontSizes')
❯ src/components/primitives/Button/Button.styles.ts:99:49
❯ mountMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:6603:23
❯ Object.useMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:22924:18
❯ process.env.NODE_ENV.exports.useMemo ../../node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:1209:34
❯ useStyles src/components/primitives/Button/Button.styles.ts:50:10
❯ Button src/components/primitives/Button/Button.tsx:115:20
❯ Object.react-stack-bottom-frame ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:23863:20
❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:5529:22
❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:8645:19
❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10861:18
|
|
src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.test.tsx > BaseOrganizationSwitcher RTL Support > should render correctly in RTL mode:
packages/react/src/components/primitives/Button/Button.styles.ts#L99
TypeError: Cannot read properties of undefined (reading 'fontSizes')
❯ src/components/primitives/Button/Button.styles.ts:99:49
❯ mountMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:6603:23
❯ Object.useMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:22924:18
❯ process.env.NODE_ENV.exports.useMemo ../../node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:1209:34
❯ useStyles src/components/primitives/Button/Button.styles.ts:50:10
❯ Button src/components/primitives/Button/Button.tsx:115:20
❯ Object.react-stack-bottom-frame ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:23863:20
❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:5529:22
❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:8645:19
❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10861:18
|
|
src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.test.tsx > BaseOrganizationSwitcher RTL Support > should render correctly in LTR mode:
packages/react/src/components/primitives/Button/Button.styles.ts#L99
TypeError: Cannot read properties of undefined (reading 'fontSizes')
❯ src/components/primitives/Button/Button.styles.ts:99:49
❯ mountMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:6603:23
❯ Object.useMemo ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:22924:18
❯ process.env.NODE_ENV.exports.useMemo ../../node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.development.js:1209:34
❯ useStyles src/components/primitives/Button/Button.styles.ts:50:10
❯ Button src/components/primitives/Button/Button.tsx:115:20
❯ Object.react-stack-bottom-frame ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:23863:20
❯ renderWithHooks ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:5529:22
❯ updateForwardRef ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:8645:19
❯ beginWork ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-client.development.js:10861:18
|
|
src/__test__/useForm.test.ts > useForm hook - full coverage > setValue and validate on change:
packages/react/src/__test__/useForm.test.ts#L65
AssertionError: expected 'Invalid email' to be undefined
- Expected:
undefined
+ Received:
"Invalid email"
❯ src/__test__/useForm.test.ts:65:48
|
|
src/__test__/useBrowserUrl.test.ts > useBrowserUrl hook > handles relative afterSignInUrl:
packages/react/src/hooks/useBrowserUrl.ts#L52
TypeError: Invalid URL: /callback
❯ new URLImpl ../../node_modules/.pnpm/[email protected]/node_modules/whatwg-url/lib/URL-impl.js:20:13
❯ Object.exports.setup ../../node_modules/.pnpm/[email protected]/node_modules/whatwg-url/lib/URL.js:54:12
❯ new URL ../../node_modules/.pnpm/[email protected]/node_modules/whatwg-url/lib/URL.js:115:22
❯ hasAuthParams src/hooks/useBrowserUrl.ts:52:80
❯ src/__test__/useBrowserUrl.test.ts:75:16
|
|
⬣ ESLint (STATIC ANALYSIS) (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
⬣ ESLint (STATIC ANALYSIS) (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
⬣ ESLint (STATIC ANALYSIS) (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
⬣ ESLint (STATIC ANALYSIS) (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
⬣ ESLint (STATIC ANALYSIS) (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
⬣ ESLint (STATIC ANALYSIS) (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
🚧 Build (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
🚧 Build (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
🚧 Build (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
🚧 Build (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
🚧 Build (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
🚧 Build (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
👾 Unit Test (TESTING) (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
👾 Unit Test (TESTING) (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
👾 Unit Test (TESTING) (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
👾 Unit Test (TESTING) (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
👾 Unit Test (TESTING) (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
👾 Unit Test (TESTING) (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
ʦ Typecheck (STATIC ANALYSIS) (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
ʦ Typecheck (STATIC ANALYSIS) (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
ʦ Typecheck (STATIC ANALYSIS) (lts/*, latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
ʦ Typecheck (STATIC ANALYSIS) (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
ʦ Typecheck (STATIC ANALYSIS) (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
ʦ Typecheck (STATIC ANALYSIS) (lts/*, latest)
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|