mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
chore: remove remaining mocha references
- refresh-page fixture served mocha.js as a 'large JS file' over a custom protocol; point it at chai.js instead since mocha is no longer a dep - drop descriptive 'mocha' mentions from comments
This commit is contained in:
@@ -24,7 +24,7 @@ export default defineConfig({
|
||||
// Run test *files* in parallel across workers...
|
||||
fileParallelism: true,
|
||||
isolate: true,
|
||||
// ...but keep tests *within* a file sequential, matching current mocha behaviour.
|
||||
// ...but keep tests *within* a file sequential.
|
||||
sequence: { concurrent: false },
|
||||
allowOnly: !process.env.CI,
|
||||
retry: process.env.CI ? 3 : 0,
|
||||
|
||||
6
spec/fixtures/apps/refresh-page/main.html
vendored
6
spec/fixtures/apps/refresh-page/main.html
vendored
@@ -1,9 +1,9 @@
|
||||
<html>
|
||||
<body>
|
||||
<!-- Use mocha which has a large enough js file -->
|
||||
<script src="mocha.js"></script>
|
||||
<!-- Use chai which has a large enough js file -->
|
||||
<script src="chai.js"></script>
|
||||
<script>
|
||||
mocha.setup('bdd');
|
||||
void chai;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
4
spec/fixtures/apps/refresh-page/main.js
vendored
4
spec/fixtures/apps/refresh-page/main.js
vendored
@@ -25,8 +25,8 @@ app.once('ready', async () => {
|
||||
|
||||
protocol.handle('atom', (request) => {
|
||||
let { pathname } = new URL(request.url);
|
||||
if (pathname === '/mocha.js') {
|
||||
pathname = path.resolve(__dirname, '../../../node_modules/mocha/mocha.js');
|
||||
if (pathname === '/chai.js') {
|
||||
pathname = path.resolve(__dirname, '../../../node_modules/chai/chai.js');
|
||||
} else {
|
||||
pathname = path.join(__dirname, pathname);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export const ifdescribe = (condition: boolean) => describe.runIf(condition);
|
||||
type DoneCallback = (err?: unknown) => void;
|
||||
|
||||
/**
|
||||
* Adapts a mocha-style callback test (receiving a `done` function) into a
|
||||
* Adapts a callback-style test (receiving a `done` function) into a
|
||||
* vitest-compatible test that returns a Promise. `done()` resolves,
|
||||
* `done(err)` rejects.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user