fix failing tests

pull/5639/head
Ivan Hofer 5 years ago
parent d54ab8cddb
commit ada8969fe5

@ -1,8 +1,8 @@
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
add_css_to_component,
append,
append_styles,
attr,
detach,
element,
@ -15,7 +15,7 @@ import {
} from "svelte/internal";
function add_css(options) {
add_css_to_component(options, "1a7i8ec", "p.svelte-1a7i8ec{color:red}");
append_styles(options, "1a7i8ec", "p.svelte-1a7i8ec{color:red}");
}
function create_fragment(ctx) {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
add_css_to_component,
append_styles,
attr,
detach,
element,
@ -12,7 +12,7 @@ import {
} from "svelte/internal";
function add_css(options) {
add_css_to_component(options, "1slhpfn", "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}");
append_styles(options, "1slhpfn", "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}");
}
function create_fragment(ctx) {

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

Loading…
Cancel
Save