ruffle/web/packages/selfhosted/test/polyfill/embed_unexpected_string/test.js

20 lines
634 B
JavaScript
Raw Normal View History

2023-05-30 20:24:43 +00:00
const { injectRuffleAndWait, openTest } = require("../../utils");
2020-05-23 09:43:22 +00:00
const { expect, use } = require("chai");
const chaiHtml = require("chai-html");
const fs = require("fs");
use(chaiHtml);
2020-09-05 18:36:44 +00:00
describe("Embed with unexpected string", () => {
it("loads the test", async () => {
2023-05-30 20:24:43 +00:00
await openTest(browser, __dirname);
2020-05-23 09:43:22 +00:00
});
it("polyfills with ruffle", async () => {
2023-05-30 20:24:43 +00:00
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
2020-05-23 09:43:22 +00:00
const expected = fs.readFileSync(`${__dirname}/expected.html`, "utf8");
expect(actual).html.to.equal(expected);
});
});