We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f2f18 commit a2f34f5Copy full SHA for a2f34f5
packages/@vuepress/shared-utils/lib/module.js
@@ -42,7 +42,7 @@ exports.resolveModule = function (request, context) {
42
// TODO
43
// Temporary workaround for jest cannot resolve module path from '__mocks__'
44
// when using 'require.resolve'.
45
- if (isTest()) {
+ if (isTest() && request !== '@vuepress/theme-default') {
46
resolvedPath = path.resolve(__dirname, '../../../../__mocks__', request)
47
if (!fs.existsSync(`${resolvedPath}.js`) && !fs.existsSync(`${resolvedPath}/index.js`)) {
48
throw new Error(`Cannot find module '${request}'`)
0 commit comments