Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tests/e2e/translate-eval.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import {execa} from 'execa';
import {mkdtempSync, readFileSync} from 'node:fs';
import {existsSync, mkdtempSync, readFileSync} from 'node:fs';
import {tmpdir} from 'node:os';
import {join, resolve} from 'node:path';
import {describe, expect, it} from 'vitest';

const root = resolve(__dirname, '../..');

// The harness runner needs `scripts/translate-eval.mjs` and the `src/` tree,
// which are not shipped in the npm package (`files` whitelists only
// lib/build/assets/tests). Consumers running the packaged integration tests
// against their own binary get this spec without its runner, so skip it there.
const harnessAvailable = existsSync(join(root, 'scripts/translate-eval.mjs'));

describe('translate eval harness', () => {
it(
it.skipIf(!harnessAvailable)(
'should pass end-to-end on the reference corpus with the mock provider',
{timeout: 300_000},
async () => {
Expand Down
Loading