mirror of https://github.com/sundowndev/http.git
update tests
parent
15cca3aede
commit
33db91eed5
|
@ -1,11 +0,0 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env', {
|
||||
targets: {
|
||||
esmodules: true
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
|
@ -13,10 +13,12 @@ async function setupNuxt(config) {
|
|||
// Spy addTemplate
|
||||
nuxt.moduleContainer.addTemplate = jest.fn(nuxt.moduleContainer.addTemplate)
|
||||
|
||||
const build = new Builder(nuxt)
|
||||
const builder = new Builder(nuxt)
|
||||
|
||||
await build.validatePages()
|
||||
await build.generateRoutesAndFiles()
|
||||
await builder.validatePages()
|
||||
await builder.generateRoutesAndFiles()
|
||||
|
||||
nuxt.builder = builder
|
||||
|
||||
await nuxt.listen(3000)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ const { setupNuxt } = require('./_utils')
|
|||
describe('browserBaseURL', () => {
|
||||
let nuxt
|
||||
|
||||
beforeAll(async () => {
|
||||
test('setup', async () => {
|
||||
nuxt = await setupNuxt({
|
||||
http: {
|
||||
browserBaseURL: '/test_api'
|
||||
|
|
|
@ -3,7 +3,7 @@ const { setupNuxt } = require('./_utils')
|
|||
describe('empty config', () => {
|
||||
let nuxt
|
||||
|
||||
beforeAll(async () => {
|
||||
test('setup', async () => {
|
||||
nuxt = await setupNuxt({
|
||||
http: {}
|
||||
})
|
||||
|
|
|
@ -6,8 +6,10 @@ const url = path => `http://localhost:3000${path}`
|
|||
describe('module', () => {
|
||||
let nuxt
|
||||
|
||||
beforeAll(async () => {
|
||||
test('setup', async () => {
|
||||
nuxt = await setupNuxt()
|
||||
|
||||
await nuxt.builder.build()
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
|
|
Loading…
Reference in New Issue