mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
fix(renderer): setAnsiColors is not a function
This commit is contained in:
parent
03f3ff4517
commit
984788362a
@ -42,19 +42,6 @@ export const getContext = function getContext(req, res) {
|
||||
return { req, res }
|
||||
}
|
||||
|
||||
export const setAnsiColors = function setAnsiColors(ansiHTML) {
|
||||
ansiHTML.setColors({
|
||||
reset: ['efefef', 'a6004c'],
|
||||
darkgrey: '5a012b',
|
||||
yellow: 'ffab07',
|
||||
green: 'aeefba',
|
||||
magenta: 'ff84bf',
|
||||
blue: '3505a0',
|
||||
cyan: '56eaec',
|
||||
red: '4e053a'
|
||||
})
|
||||
}
|
||||
|
||||
export const waitFor = function waitFor(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms || 0))
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import Debug from 'debug'
|
||||
import connect from 'connect'
|
||||
import launchMiddleware from 'launch-editor-middleware'
|
||||
|
||||
import { setAnsiColors, isUrl, waitFor, timeout } from '../common/utils'
|
||||
import { isUrl, waitFor, timeout } from '../common/utils'
|
||||
import defaults from '../common/nuxt.config'
|
||||
|
||||
import MetaRenderer from './meta'
|
||||
@ -22,8 +22,6 @@ import nuxtMiddleware from './middleware/nuxt'
|
||||
const debug = Debug('nuxt:render')
|
||||
debug.color = 4 // Force blue color
|
||||
|
||||
setAnsiColors(ansiHTML)
|
||||
|
||||
let jsdom = null
|
||||
|
||||
export default class Renderer {
|
||||
|
@ -16,10 +16,6 @@ describe('utils', () => {
|
||||
expect(ctx.res.b).toBe(2)
|
||||
})
|
||||
|
||||
test('setAnsiColors', () => {
|
||||
Utils.setAnsiColors(ansiHTML)
|
||||
})
|
||||
|
||||
test('waitFor', async () => {
|
||||
let s = Date.now()
|
||||
await Utils.waitFor(100)
|
||||
|
Loading…
Reference in New Issue
Block a user