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:
Samuel Attard
2026-04-11 23:32:35 -07:00
parent 6fea5e8691
commit 3bb67099de
4 changed files with 7 additions and 7 deletions

View File

@@ -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,

View File

@@ -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>

View File

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

View File

@@ -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.
*/