Skip to content

Commit

Permalink
fix: mocked module
Browse files Browse the repository at this point in the history
  • Loading branch information
ovflowd committed Nov 28, 2023
1 parent dac2a53 commit e73f6d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/__mocks__/github-slugger.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class GitHubSlugger {
slug() {
return 'mock-slug';
}
}

export default GitHubSlugger;
1 change: 1 addition & 0 deletions jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const customJestConfig = {
moduleNameMapper: {
'next/router': '<rootDir>/components/__mocks__/next-router.mjs',
'next-intl': '<rootDir>/components/__mocks__/next-intl.mjs',
'github-slugger': '<rootDir>/components/__mocks__/github-slugger.mjs',
},
};

Expand Down

0 comments on commit e73f6d9

Please sign in to comment.