mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 22:55:13 +00:00
a616c09b22
* feat(test): enable tests in packages * fix: wait error hook * test: entry and hookable in core * fix(test): options snapshot in windows * refactor(test): simpilify jest.fn * test: module in core * test: complete module test * test: add test for resolver in core * test: update config snapshot * test: nuxt in core module
17 lines
482 B
JavaScript
17 lines
482 B
JavaScript
import { getDefaultNuxtConfig, getNuxtConfig } from '../src'
|
|
|
|
jest.mock('../src/options', () => ({
|
|
getNuxtConfig: jest.fn(() => 'nuxt config')
|
|
}))
|
|
|
|
jest.mock('../src/config', () => ({
|
|
getDefaultNuxtConfig: jest.fn(() => 'default nuxt config')
|
|
}))
|
|
|
|
describe('config: entry', () => {
|
|
test('should export getDefaultNuxtConfig and getNuxtConfig', () => {
|
|
expect(getNuxtConfig()).toEqual('nuxt config')
|
|
expect(getDefaultNuxtConfig()).toEqual('default nuxt config')
|
|
})
|
|
})
|