mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
test: remove duplicate unit tests in packages/core/test/resolver… (#5782)
This commit is contained in:
parent
d811ef7fea
commit
b62585f277
@ -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' }
|
||||||
|
Loading…
Reference in New Issue
Block a user