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 */ /* generated by Svelte vX.Y.Z */
import { import {
SvelteComponent, SvelteComponent,
add_css_to_component,
append, append,
append_styles,
attr, attr,
detach, detach,
element, element,
@ -15,7 +15,7 @@ import {
} from "svelte/internal"; } from "svelte/internal";
function add_css(options) { 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) { function create_fragment(ctx) {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { import {
SvelteComponent, SvelteComponent,
add_css_to_component, append_styles,
attr, attr,
detach, detach,
element, element,
@ -12,7 +12,7 @@ import {
} from "svelte/internal"; } from "svelte/internal";
function add_css(options) { 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) { function create_fragment(ctx) {

@ -5,7 +5,7 @@ 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);

Loading…
Cancel
Save