Commit d14203e6 authored by Evan You's avatar Evan You

test: fix tests on Windows

parent 0766fe71
......@@ -65,11 +65,11 @@ module.exports = function (source) {
}
// module id for scoped CSS & hot-reload
const shortFilePath = path
const rawShortFilePath = path
.relative(context, resourcePath)
.replace(/\\/g, '/')
.replace(/^(\.\.\/)+/, '') +
resourceQuery
.replace(/^(\.\.[\/\\])+/, '')
const shortFilePath = rawShortFilePath.replace(/\\/g, '/') + resourceQuery
const id = hash(
isProduction
......@@ -161,7 +161,7 @@ var component = normalizer(
// Expose filename. This is used by the devtools and vue runtime warnings.
if (!isProduction) {
code += `\ncomponent.options.__file = ${JSON.stringify(shortFilePath)}`
code += `\ncomponent.options.__file = ${JSON.stringify(rawShortFilePath)}`
}
code += `\nexport default component.exports`
......
......@@ -43,7 +43,7 @@ const baseConfig = {
}
function genId (file) {
return hash(path.join('test', 'fixtures', file))
return hash(path.join('test', 'fixtures', file).replace(/\\/g, '/'))
}
function bundle (options, cb, wontThrowError) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment