#!/usr/bin/env node import path from 'path' /** * 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 = import.meta.resolve('mocha') const mochaPathDir = path.dirname(mochaPath) const mochaBinPath = path.join(mochaPathDir, relativeBinPath) await import(mochaBinPath)