Skip to content

Commit 314402b

Browse files
committed
updated .eslintignore & svelte-styles-csptest index.ts
1 parent fa56460 commit 314402b

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
**/expected.js
33
_output
44
test/*/samples/*/output.js
5+
test/svelte-styles-csp/*.js
6+
test/svelte-styles-csp/svelte-test-transitions-no-styles-csp/build/*.js
7+
test/svelte-styles-csp/svelte-test-transitions-styles-csp/build/*.js
58

69
# automatically generated
710
internal_exports.ts

test/svelte-styles-csp/index.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
1-
const puppeteer = require("puppeteer");
2-
import * as assert from "assert";
3-
const path = require("path");
1+
const puppeteer = require('puppeteer');
2+
import * as assert from 'assert';
3+
const path = require('path');
44

55
// set to false to view transitions tested in Chromium
66
const headless_browser = true;
77

8-
describe("svelte-style-csp", async () => {
9-
describe("test transitions with svelte-styles-csp & strict-CSP", async () => {
10-
it("svelte-stylesheet loaded and transitions work", async () => {
8+
describe('svelte-style-csp', async () => {
9+
describe('test transitions with svelte-styles-csp & strict-CSP', async () => {
10+
it('svelte-stylesheet loaded and transitions work', async () => {
1111
const absolutePath = path.join(
1212
__dirname,
13-
"svelte-test-transitions-styles-csp/index.html"
13+
'svelte-test-transitions-styles-csp/index.html'
1414
);
1515
const browser = await puppeteer.launch({ headless: headless_browser });
1616
const page = await browser.newPage();
1717
try {
18-
await page.goto("file://" + absolutePath);
18+
await page.goto('file://' + absolutePath);
1919
await page.waitFor(1000);
2020
let linkTitle: string;
2121
// look for title attribute in link tags to
2222
const linkTitles = await page.evaluateHandle(() => {
23-
return Array.from(document.getElementsByTagName("link")).map(
23+
return Array.from(document.getElementsByTagName('link')).map(
2424
(a) => a.title
2525
);
2626
});
2727
const linkList = await linkTitles.jsonValue();
2828

2929
for (const item of linkList) {
30-
if (item == "svelte-stylesheet") linkTitle = item;
30+
if (item == 'svelte-stylesheet') linkTitle = item;
3131
}
3232

33-
await page.click("input");
33+
await page.click('input');
3434
await page.waitFor(1000);
35-
await page.click("input");
35+
await page.click('input');
3636
await page.waitFor(1000);
3737
await browser.close();
38-
assert.equal(linkTitle, "svelte-stylesheet");
38+
assert.equal(linkTitle, 'svelte-stylesheet');
3939
} catch (err) {
4040
throw new Error(err);
4141
}
4242
}).timeout(10000);
4343
});
4444

45-
describe("test transitions without svelte-styles-csp & strict CSP", async () => {
46-
it("transitions fail with strict CSP and no stylesrc: unsafe-iline", async () => {
45+
describe('test transitions without svelte-styles-csp & strict CSP', async () => {
46+
it('transitions fail with strict CSP and no stylesrc: unsafe-iline', async () => {
4747
const absolutePath = path.join(
4848
__dirname,
49-
"svelte-test-transitions-no-styles-csp/index.html"
49+
'svelte-test-transitions-no-styles-csp/index.html'
5050
);
5151
const browser = await puppeteer.launch({ headless: headless_browser });
5252
const page = await browser.newPage();
5353
try {
54-
await page.goto("file://" + absolutePath);
54+
await page.goto('file://' + absolutePath);
5555
await page.waitFor(1000);
56-
await page.click("input");
56+
await page.click('input');
5757
await page.waitFor(1000);
58-
await page.click("input");
58+
await page.click('input');
5959
await page.waitFor(1000);
6060
await browser.close();
6161
} catch (err) {

0 commit comments

Comments
 (0)