chore: fix tests

This commit is contained in:
Corbin Crutchley
2022-01-08 15:00:23 -08:00
parent 361ef80f21
commit 25ba994325
3 changed files with 11 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
import "./disqus-react";
import "./next-link";
import "./next-image";

View File

@@ -0,0 +1,9 @@
jest.mock("next/image", () => {
const React = require("react");
return function NextImage(props: any) {
return <img {...props}>{props.children}</img>;
};
});
export default {};

View File

@@ -26,7 +26,7 @@ module.exports = {
},
transformIgnorePatterns: [
// ...your ignore patterns
"^((?!node_modules).)*node_modules.((?!unified|unist|hast|remark|mdast|micromark|retext|nlcst|rehype|decode\\-named\\-character\\-reference|character\\-entities|zwitch|longest\\-streak|unherit|parse\\-|strip\\-|html\\-void\\-elements|stringify\\-entities|ccount|markdown\\-|slash).)*$",
"^((?!node_modules).)*node_modules.((?!unified|unist|hast|remark|mdast|micromark|retext|nlcst|rehype|decode-named-character-reference|character-entities|zwitch|longest-streak|unherit|parse-|strip-|html-void-elements|stringify-entities|ccount|markdown-|slash|vfile|property-|space-separated-|comma-separated-|web-namespaces).)*$",
"^.+\\.module\\.(css|sass|scss)$",
],
// moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths),