#!/usr/bin/env node import path from 'path' import url from 'node:url' /** * Find mocha and run it (we don't want to hardcode a specific node_modules path). * We use this so that we can pass in specific flags to node before mocha even begins to run */ const relativeBinPath = './bin/mocha.js' const mochaPath = url.fileURLToPath(import.meta.resolve('mocha')) const mochaPathDir = path.dirname(mochaPath) const mochaBinPath = path.join(mochaPathDir, relativeBinPath) await import(url.pathToFileURL(mochaBinPath).href)