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

Try to use newer mochify packages #2609

Merged
merged 4 commits into from
Sep 10, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions coverage.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"use strict";

const esbuild = require("esbuild");
const { esbuildPluginIstanbul } = require("esbuild-plugin-istanbul");

(async function () {
const { default: getStdin } = await import("get-stdin");
const plugins = [
esbuildPluginIstanbul({
filter: /\.js$/,
loader: "js",
name: "istanbul-loader-js",
}),
];
const stdin = {
contents: await getStdin(),
resolveDir: process.cwd(),
sourcefile: "tests.js",
loader: "js",
};

const context = await esbuild.context({
absWorkingDir: process.cwd(),
entryPoints: [],
write: false,
bundle: true,
sourcemap: "inline",
sourcesContent: true,
define: { global: "window", "process.env.NODE_DEBUG": '""' },
external: ["fs"],
target: "es2022",
plugins,
color: true,
stdin,
});

const { outputFiles } = await context.rebuild();
const js = outputFiles[0].text;

context.dispose();

process.stdout.write(js);
})();
25 changes: 25 additions & 0 deletions mochify.webdriver.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"use strict";

module.exports = {
driver: "webdriver",
// eslint-disable-next-line camelcase
driver_options: {
// Tests must run on a http website for Microsoft Edge to have
// sessionStorage.
url: "http://maxantoni.de/doctype.html",
hostname: "ondemand.saucelabs.com",
path: "/wd/hub",
port: 80,
capabilities: {
browserName: process.env.BROWSER_NAME,
browserVersion: "latest",
"sauce:options": {
build: `${process.env.BROWSER_NAME} ${
process.env.GITHUB_RUN_NUMBER || Date.now()
}`,
username: process.env.SAUCE_USERNAME,
accessKey: process.env.SAUCE_ACCESS_KEY,
},
},
},
};
Loading