|
|
@ -4,8 +4,8 @@ const b64dec = s => Buffer.from(s, 'base64').toString();
|
|
|
|
|
|
|
|
|
|
|
|
export async function test({ assert, css, js }) {
|
|
|
|
export async function test({ assert, css, js }) {
|
|
|
|
|
|
|
|
|
|
|
|
// We check that the css source map embedded in the js is accurate
|
|
|
|
// We check that the css source map embedded in the js is accurate
|
|
|
|
const match = js.code.match(/\tstyle\.textContent = "(.*?)(?:\\n\/\*# sourceMappingURL=data:(.*?);charset=(.*?);base64,(.*?) \*\/)?";\n/);
|
|
|
|
const match = js.code.match(/\tappend_styles\(options, ".{6}", "(.*?)(?:\\n\/\*# sourceMappingURL=data:(.*?);charset=(.*?);base64,(.*?) \*\/)?"\);\n/);
|
|
|
|
assert.notEqual(match, null);
|
|
|
|
assert.notEqual(match, null);
|
|
|
|
|
|
|
|
|
|
|
|
const [mimeType, encoding, cssMapBase64] = match.slice(2);
|
|
|
|
const [mimeType, encoding, cssMapBase64] = match.slice(2);
|
|
|
|