Nuxt/packages/config/test/index.test.js

17 lines
482 B
JavaScript
Raw Normal View History

2019-01-14 17:40:10 +00:00
import { getDefaultNuxtConfig, getNuxtConfig } from '../src'
jest.mock('../src/options', () => ({
getNuxtConfig: jest.fn(() => 'nuxt config')
2019-01-14 17:40:10 +00:00
}))
jest.mock('../src/config', () => ({
getDefaultNuxtConfig: jest.fn(() => 'default nuxt config')
2019-01-14 17:40:10 +00:00
}))
describe('config: entry', () => {
test('should export getDefaultNuxtConfig and getNuxtConfig', () => {
expect(getNuxtConfig()).toEqual('nuxt config')
expect(getDefaultNuxtConfig()).toEqual('default nuxt config')
})
})