Skip to content

Commit

Permalink
fix(test): fixes the tests in packages
Browse files Browse the repository at this point in the history
  • Loading branch information
andypf committed Dec 3, 2024
1 parent 010c142 commit 51a360d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/volta/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
testEnvironment: "jsdom",
setupFilesAfterEnv: ["<rootDir>/setupTests.js"],
transformIgnorePatterns: [
"node_modules/(?!(@cloudoperators/juno-ui-components|@cloudoperators/juno-messages-provider|@cloudoperators/juno-utils)/)",
"node_modules/(?!(@cloudoperators/juno-ui-components|@cloudoperators/juno-messages-provider|@cloudoperators/juno-utils|@cloudoperators/juno-url-state-provider-v1)/)",
],
moduleNameMapper: {
// Jest currently doesn't support resources with query parameters.
Expand Down
4 changes: 2 additions & 2 deletions packages/volta/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/volta/src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { render } from "@testing-library/react"
import { screen } from "shadow-dom-testing-library"
import { oidcSession } from "@cloudoperators/juno-oauth"

jest.mock("oauth", () => {
jest.mock("@cloudoperators/juno-oauth", () => {
return {
oidcSession: jest.fn((props = {}) => {
if (props?.onUpdate) {
Expand Down
4 changes: 3 additions & 1 deletion packages/whois/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ module.exports = {
transform: { "\\.[jt]sx?$": "babel-jest" },
testEnvironment: "jsdom",
setupFilesAfterEnv: ["<rootDir>/setupTests.js"],
transformIgnorePatterns: ["node_modules/(?!(from "@cloudoperators/juno-ui-components")/)"],
transformIgnorePatterns: [
"node_modules/(?!(@cloudoperators/juno-ui-components|@cloudoperators/juno-url-state-provider-v1)/)",
],
moduleNameMapper: {
// Jest currently doesn't support resources with query parameters.
// Therefore we add the optional query parameter matcher at the end
Expand Down

0 comments on commit 51a360d

Please sign in to comment.