Skip to content

fix(tests): skip translate eval e2e when the harness is not shipped - #2234

Open
martyanovandrey wants to merge 1 commit into
masterfrom
fix/translate-eval-packaged-tests
Open

fix(tests): skip translate eval e2e when the harness is not shipped#2234
martyanovandrey wants to merge 1 commit into
masterfrom
fix/translate-eval-packaged-tests

Conversation

@martyanovandrey

Copy link
Copy Markdown
Contributor

What

The npm package ships tests/ (so downstream consumers can run the integration suite against their own binary via DIPLODOC_BINARY_PATH), but not scripts/ and src/, which the eval harness runner (scripts/translate-eval.mjs, added in #2225) needs: the runner bundles src/commands/translate/eval/cli.ts on the fly with esbuild.

So any consumer running the packaged integration tests got tests/e2e/translate-eval.spec.ts without its runner: the spec spawned a missing script, the child died with MODULE_NOT_FOUND on stderr, and the assertion failed with expected '' to contain 'Verdict: PASS'. This is exactly what broke the internal cli release flow on 5.57.x.

Fix

Skip the spec when scripts/translate-eval.mjs is absent next to the tests (i.e. when running from the packaged layout). In-repo runs are unaffected and still execute the full e2e.

Verified both ways: npm pack + running the spec from the extracted tarball reports 1 skipped; the in-repo run passes.

Making the harness runnable from the package (prebuilding the eval cli into build/) would let downstream flows gate on translation quality too - left as a possible follow-up.

The npm package ships tests/ (so downstream consumers can run the
integration suite against their own binary) but not scripts/ and src/,
which the eval harness runner needs. In that layout the spec spawned a
missing script and failed with empty stdout. Skip it when
scripts/translate-eval.mjs is absent; in-repo runs are unaffected.
@martyanovandrey
martyanovandrey requested review from a team and diplodoc-bot as code owners August 28, 2026 12:08
@martyanovandrey
martyanovandrey requested review from Yurok868 and stenin-nikita and removed request for a team August 28, 2026 12:08
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant