-
-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use newer @mochify/* packages (#2609)
* Try to use newer mochify packages * working esbuild * Fix mochify setup * Hacky coverage --------- Co-authored-by: Maximilian Antoni <mail@maxantoni.de>
- Loading branch information
Showing
5 changed files
with
3,035 additions
and
1,692 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,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); | ||
})(); |
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,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, | ||
}, | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.