Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): bump chai from 4.4.1 to 5.1.0 in /web #15877

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
73 changes: 28 additions & 45 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@wdio/mocha-framework": "^8.35.0",
"@wdio/spec-reporter": "^8.32.4",
"@wdio/static-server-service": "^8.32.4",
"chai": "^4.4.1",
"chai": "^5.1.0",
"chai-html": "^2.1.0",
"copy-webpack-plugin": "^12.0.2",
"cross-env": "^7.0.3",
Expand Down
2 changes: 2 additions & 0 deletions web/packages/selfhosted/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
parserOptions:
sourceType: module
2 changes: 0 additions & 2 deletions web/packages/selfhosted/js/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
env:
browser: true
parserOptions:
sourceType: module
1 change: 1 addition & 0 deletions web/packages/selfhosted/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Putting Flash back on the web. Ruffle will polyfill all Flash content and replace it with the Ruffle flash player.",
"license": "(MIT OR Apache-2.0)",
"private": true,
"type": "module",
"keywords": [
"flash",
"swf"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { jsApiBefore, getTraceOutput } = require("../../utils");
const { use, expect } = require("chai");
const chaiHtml = require("chai-html");
const { Key } = require("webdriverio");
import { jsApiBefore, getTraceOutput } from "../../utils.js";
import { use, expect } from "chai";
import chaiHtml from "chai-html";
import { Key } from "webdriverio";

use(chaiHtml);

Expand Down
6 changes: 3 additions & 3 deletions web/packages/selfhosted/test/js_api/load.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { jsApiBefore, playAndMonitor } = require("../utils");
const { use } = require("chai");
const chaiHtml = require("chai-html");
import { jsApiBefore, playAndMonitor } from "../utils.js";
import { use } from "chai";
import chaiHtml from "chai-html";

use(chaiHtml);

Expand Down
6 changes: 3 additions & 3 deletions web/packages/selfhosted/test/js_api/metadata.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { jsApiBefore } = require("../utils");
const { expect, use } = require("chai");
const chaiHtml = require("chai-html");
import { jsApiBefore } from "../utils.js";
import { expect, use } from "chai";
import chaiHtml from "chai-html";

use(chaiHtml);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const { openTest, injectRuffleAndWait } = require("../../utils");
const { expect, use } = require("chai");
const chaiHtml = require("chai-html");
const fs = require("fs");
import { openTest, injectRuffleAndWait } from "../../utils.js";
import { expect, use } from "chai";
import chaiHtml from "chai-html";
import fs from "fs";

use(chaiHtml);

describe("Flash inside frame with injected ruffle", () => {
it("loads the test", async () => {
await openTest(browser, __dirname);
await openTest(browser, import.meta.dirname);
});

it("polyfills inside a frame", async () => {
Expand All @@ -16,7 +16,10 @@ describe("Flash inside frame with injected ruffle", () => {
await browser.$("<ruffle-object />").waitForExist();

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);
});

Expand All @@ -37,7 +40,10 @@ describe("Flash inside frame with injected ruffle", () => {
await browser.$("<ruffle-object />").waitForExist();

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);
});
});
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
const { openTest } = require("../../utils");
const { expect, use } = require("chai");
const chaiHtml = require("chai-html");
const fs = require("fs");
import { openTest } from "../../utils.js";
import { expect, use } from "chai";
import chaiHtml from "chai-html";
import fs from "fs";

use(chaiHtml);

describe("Flash inside frame with provided ruffle", () => {
it("loads the test", async () => {
await openTest(browser, __dirname);
await openTest(browser, import.meta.dirname);
});

it("polyfills inside a frame", async () => {
await browser.switchToFrame(await browser.$("#test-frame"));
await browser.$("<ruffle-object />").waitForExist();

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);
});

Expand All @@ -36,7 +39,10 @@ describe("Flash inside frame with provided ruffle", () => {
await browser.$("<ruffle-object />").waitForExist();

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);
});
});
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
const {
openTest,
injectRuffleAndWait,
playAndMonitor,
} = require("../../utils");
const { expect, use } = require("chai");
const chaiHtml = require("chai-html");
const fs = require("fs");
import { openTest, injectRuffleAndWait, playAndMonitor } from "../../utils.js";
import { expect, use } from "chai";
import chaiHtml from "chai-html";
import fs from "fs";

use(chaiHtml);

// [NA] Disabled for now as the test can take too long on CI
describe.skip("Doesn't error with cross-origin frames", () => {
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);
});

Expand Down
19 changes: 9 additions & 10 deletions web/packages/selfhosted/test/polyfill/embed_default/test.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
const {
injectRuffleAndWait,
openTest,
playAndMonitor,
} = require("../../utils");
const { expect, use } = require("chai");
const chaiHtml = require("chai-html");
const fs = require("fs");
import { injectRuffleAndWait, openTest, playAndMonitor } from "../../utils.js";
import { expect, use } from "chai";
import chaiHtml from "chai-html";
import fs from "fs";

use(chaiHtml);

describe("Embed tag", () => {
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);
});

Expand Down
19 changes: 9 additions & 10 deletions web/packages/selfhosted/test/polyfill/embed_insensitive/test.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
const {
openTest,
injectRuffleAndWait,
playAndMonitor,
} = require("../../utils");
const { expect, use } = require("chai");
const chaiHtml = require("chai-html");
const fs = require("fs");
import { openTest, injectRuffleAndWait, playAndMonitor } from "../../utils.js";
import { expect, use } from "chai";
import chaiHtml from "chai-html";
import fs from "fs";

use(chaiHtml);

describe("Embed with case-insensitive MIME type", () => {
it("loads the test", async () => {
await openTest(browser, __dirname);
await openTest(browser, import.meta.dirname);
});

it("Polyfills", async () => {
await injectRuffleAndWait(browser);
await browser.$("<ruffle-embed />").waitForExist();

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);
});

Expand Down