async function runMochaWithWorkspace(filePath) {
    const basename = path.basename(filePath, ".js")
    const workspacePath = path.resolve(__dirname, `../../test-workspace-${basename}`)

    await fs.remove(workspacePath)
    await fs.copy(WORKSPACE_PATH, workspacePath, { dereference: true, recursive: true })
    try {
        return await runMocha(filePath, workspacePath)
    }
    finally {
        try {
            await fs.remove(workspacePath)
        }
        catch (_error) {
            // ignore to keep the original error.
        }
    }
}
Run a given test file.
@param {string} filePath The absolute path to a test file.
@returns {Promise<{duration:number,exitCode:number,failing:number,id:string,passing:number,text:string}>}
- `duration` is the spent time in seconds.
- `exitCode` is the exit code of the child process.
- `failing` is the number of failed tests.
- `id` is the name of this tests.
- `passing` is the number of succeeded tests.
- `text` is the result text of the child process.