-
-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web: Port the selfhosted package to modules
- Loading branch information
1 parent
b2cabdf
commit bffa2e8
Showing
48 changed files
with
394 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
parserOptions: | ||
sourceType: module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
env: | ||
browser: true | ||
parserOptions: | ||
sourceType: module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
web/packages/selfhosted/test/integration_tests/keyboard_input/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
web/packages/selfhosted/test/polyfill/crossorigin_broken_cors/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
web/packages/selfhosted/test/polyfill/embed_default/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
web/packages/selfhosted/test/polyfill/embed_insensitive/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 9 additions & 6 deletions
15
web/packages/selfhosted/test/polyfill/embed_inside_audio/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
const { injectRuffleAndWait, openTest } = require("../../utils"); | ||
const { expect, use } = require("chai"); | ||
const chaiHtml = require("chai-html"); | ||
const fs = require("fs"); | ||
import { injectRuffleAndWait, openTest } from "../../utils.js"; | ||
import { expect, use } from "chai"; | ||
import chaiHtml from "chai-html"; | ||
import fs from "fs"; | ||
|
||
use(chaiHtml); | ||
|
||
describe("Embed inside audio node", () => { | ||
it("loads the test", async () => { | ||
await openTest(browser, __dirname); | ||
await openTest(browser, import.meta.dirname); | ||
}); | ||
|
||
it("doesn't polyfill with ruffle", async () => { | ||
await injectRuffleAndWait(browser); | ||
const actual = await browser.$("#test-container").getHTML(false); | ||
const expected = fs.readFileSync(`${__dirname}/expected.html`, "utf8"); | ||
const expected = fs.readFileSync( | ||
`${import.meta.dirname}/expected.html`, | ||
"utf8", | ||
); | ||
expect(actual).html.to.equal(expected); | ||
}); | ||
}); |
15 changes: 9 additions & 6 deletions
15
web/packages/selfhosted/test/polyfill/embed_missing_src/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
const { injectRuffleAndWait, openTest } = require("../../utils"); | ||
const { expect, use } = require("chai"); | ||
const chaiHtml = require("chai-html"); | ||
const fs = require("fs"); | ||
import { injectRuffleAndWait, openTest } from "../../utils.js"; | ||
import { expect, use } from "chai"; | ||
import chaiHtml from "chai-html"; | ||
import fs from "fs"; | ||
|
||
use(chaiHtml); | ||
|
||
describe("Embed without src attribute", () => { | ||
it("loads the test", async () => { | ||
await openTest(browser, __dirname); | ||
await openTest(browser, import.meta.dirname); | ||
}); | ||
|
||
it("doesn't polyfill with ruffle", async () => { | ||
await injectRuffleAndWait(browser); | ||
const actual = await browser.$("#test-container").getHTML(false); | ||
const expected = fs.readFileSync(`${__dirname}/expected.html`, "utf8"); | ||
const expected = fs.readFileSync( | ||
`${import.meta.dirname}/expected.html`, | ||
"utf8", | ||
); | ||
expect(actual).html.to.equal(expected); | ||
}); | ||
}); |
19 changes: 9 additions & 10 deletions
19
web/packages/selfhosted/test/polyfill/embed_missing_type/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 9 additions & 6 deletions
15
web/packages/selfhosted/test/polyfill/embed_unexpected_string/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
const { injectRuffleAndWait, openTest } = require("../../utils"); | ||
const { expect, use } = require("chai"); | ||
const chaiHtml = require("chai-html"); | ||
const fs = require("fs"); | ||
import { injectRuffleAndWait, openTest } from "../../utils.js"; | ||
import { expect, use } from "chai"; | ||
import chaiHtml from "chai-html"; | ||
import fs from "fs"; | ||
|
||
use(chaiHtml); | ||
|
||
describe("Embed with unexpected string", () => { | ||
it("loads the test", async () => { | ||
await openTest(browser, __dirname); | ||
await openTest(browser, import.meta.dirname); | ||
}); | ||
|
||
it("polyfills with ruffle", async () => { | ||
await injectRuffleAndWait(browser); | ||
const actual = await browser.$("#test-container").getHTML(false); | ||
const expected = fs.readFileSync(`${__dirname}/expected.html`, "utf8"); | ||
const expected = fs.readFileSync( | ||
`${import.meta.dirname}/expected.html`, | ||
"utf8", | ||
); | ||
expect(actual).html.to.equal(expected); | ||
}); | ||
}); |
15 changes: 9 additions & 6 deletions
15
web/packages/selfhosted/test/polyfill/embed_wrong_type/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
const { injectRuffleAndWait, openTest } = require("../../utils"); | ||
const { expect, use } = require("chai"); | ||
const chaiHtml = require("chai-html"); | ||
const fs = require("fs"); | ||
import { injectRuffleAndWait, openTest } from "../../utils.js"; | ||
import { expect, use } from "chai"; | ||
import chaiHtml from "chai-html"; | ||
import fs from "fs"; | ||
|
||
use(chaiHtml); | ||
|
||
describe("Embed with wrong type attribute value", () => { | ||
it("loads the test", async () => { | ||
await openTest(browser, __dirname); | ||
await openTest(browser, import.meta.dirname); | ||
}); | ||
|
||
it("polyfills with ruffle", async () => { | ||
await injectRuffleAndWait(browser); | ||
const actual = await browser.$("#test-container").getHTML(false); | ||
const expected = fs.readFileSync(`${__dirname}/expected.html`, "utf8"); | ||
const expected = fs.readFileSync( | ||
`${import.meta.dirname}/expected.html`, | ||
"utf8", | ||
); | ||
expect(actual).html.to.equal(expected); | ||
}); | ||
}); |
Oops, something went wrong.