test: remove duplicate unit tests in packages/core/test/resolver… (#5782)

This commit is contained in:
cui_xiaorui 2019-05-22 17:25:49 +08:00 committed by Xin Du (Clark)
parent d811ef7fea
commit b62585f277

View File

@ -73,17 +73,6 @@ describe('core: resolver', () => {
expect(() => resolver.resolveModule('/var/nuxt/resolver')).toThrow('resolve failed') expect(() => resolver.resolveModule('/var/nuxt/resolver')).toThrow('resolve failed')
}) })
test('should throw error when _resolveFilename failed', () => {
const resolver = new Resolver({
options: { modulesDir: '/var/nuxt/node_modules' }
})
Module._resolveFilename = jest.fn(() => {
throw new Error('resolve failed')
})
expect(() => resolver.resolveModule('/var/nuxt/resolver')).toThrow('resolve failed')
})
test('should resolve root alias', () => { test('should resolve root alias', () => {
const resolver = new Resolver({ const resolver = new Resolver({
options: { rootDir: '/var/nuxt' } options: { rootDir: '/var/nuxt' }