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
2 changes: 1 addition & 1 deletion frontends/jest.jsdom.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const config: Config.InitialOptions &
"^.+\\.(t|j)sx?$": "@swc/jest",
},
moduleNameMapper: {
"\\.svg$": "ol-test-utilities/filemocks/svgmock.js",
"\\.(svg|jpg|jpeg|png)$": "ol-test-utilities/filemocks/imagemock.js",
"\\.(css|scss)$": "ol-test-utilities/filemocks/filemock.js",
},
rootDir: "./src",
Expand Down
15 changes: 15 additions & 0 deletions frontends/main/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import path from "path"
import type { Config } from "@jest/types"
import baseConfig from "../jest.jsdom.config"
const config: Config.InitialOptions = {
...baseConfig,
setupFilesAfterEnv: [
...baseConfig.setupFilesAfterEnv,
"./test-utils/setupJest.ts",
],
moduleNameMapper: {
...baseConfig.moduleNameMapper,
"^@/(.*)$": path.resolve(__dirname, "src/$1"),
},
}
export default config
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
}

describe("ProgramLetterDisplayPage", () => {
it("Renders a program letter from api", async () => {
// See https://github.com/mitodl/hq/issues/5694
it.skip("Renders a program letter from api", async () => {

Check warning on line 22 in frontends/main/src/app-pages/ProgramLetterPage/[id]/view/ProgramLetter.test.tsx

View workflow job for this annotation

GitHub Actions / javascript-tests

Disabled test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This failure was introduced after the tests started being skipped. It's not straightforward to fix—primarily because it's not straightforward to load relevant test data to verify any changes in the UI.

See https://github.com/mitodl/hq/issues/5694

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like at some point the program letter intercept view (which is what actually generates the letter and passes the user along was removed along with tests for some reason. Fine with skipping this for now until we re-enable that

const programLetter = factory.programLetter()
setup({ programLetter })
await waitFor(() => {
Expand Down
Loading