Skip to content

Commit

Permalink
Patch karma to allow loading virtual packages
Browse files Browse the repository at this point in the history
  • Loading branch information
snasirca committed Jun 7, 2020
1 parent 41fa9c0 commit 21b8233
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/middleware/karma.js
Expand Up @@ -220,11 +220,11 @@ function createKarmaMiddleware (
}) : []

return data
.replace('%SCRIPTS%', scriptTags.join('\n'))
.replace('%CLIENT_CONFIG%', 'window.__karma__.config = ' + JSON.stringify(client) + ';\n')
.replace('%SCRIPT_URL_ARRAY%', 'window.__karma__.scriptUrls = ' + JSON.stringify(scriptUrls) + ';\n')
.replace('%MAPPINGS%', 'window.__karma__.files = {\n' + mappings.join(',\n') + '\n};\n')
.replace('\n%X_UA_COMPATIBLE%', getXUACompatibleMetaElement(request.url))
.replace('%SCRIPTS%', () => scriptTags.join('\n'))
.replace('%CLIENT_CONFIG%', () => 'window.__karma__.config = ' + JSON.stringify(client) + ';\n')
.replace('%SCRIPT_URL_ARRAY%', () => 'window.__karma__.scriptUrls = ' + JSON.stringify(scriptUrls) + ';\n')
.replace('%MAPPINGS%', () => 'window.__karma__.files = {\n' + mappings.join(',\n') + '\n};\n')
.replace('\n%X_UA_COMPATIBLE%', () => getXUACompatibleMetaElement(request.url))
})
})
} else if (requestUrl === '/context.json') {
Expand Down

0 comments on commit 21b8233

Please sign in to comment.