Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cristinabuenahora committed Oct 30, 2023
1 parent b7f3964 commit 5adb731
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions plugins/tech-radar/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ module.exports = {
moduleNameMapper: {
// map static asset imports to a stub file under the assumption they are not important to our tests
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/__mocks__/fileMock.js",
"<rootDir>/__mocks__/fileMock.js",
// map style asset imports to a stub file under the assumption they are not important to our tests
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
"@cortexapps/plugin-core/components":
"<rootDir>/node_modules/@cortexapps/plugin-core/dist/components.cjs.js",
"<rootDir>/../../node_modules/@cortexapps/plugin-core/dist/components.cjs.js",
"@cortexapps/plugin-core":
"<rootDir>/node_modules/@cortexapps/plugin-core/dist/index.cjs.js",
"<rootDir>/../../node_modules/@cortexapps/plugin-core/dist/index.cjs.js",
},
setupFilesAfterEnv: ["<rootDir>/setupTests.ts"],
testEnvironment: "jsdom",
Expand Down
3 changes: 1 addition & 2 deletions plugins/tech-radar/src/components/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { render, screen } from "@testing-library/react";
import App from "./App";
import "@types/jest";

describe("App", () => {
it("indicates that it's an awesome plugin", () => {
render(<App />);

expect(screen.queryByText(/My Awesome Cortex Plugin/)).toBeInTheDocument();
expect(screen.queryByText(/Tech Radar/)).toBeInTheDocument();
});
});
2 changes: 1 addition & 1 deletion plugins/tech-radar/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"removeComments": true,
"strictNullChecks": true,
"target": "es6",
"typeRoots": ["./node_modules/@types"]
"typeRoots": ["../../node_modules/@types", "./node_modules/@types"]
}
}

0 comments on commit 5adb731

Please sign in to comment.