Skip to content

test: run the .deck language suites natively on tish test - #15

Merged
spacedevin merged 1 commit into
mainfrom
feat/tish-test
Aug 12, 2026
Merged

test: run the .deck language suites natively on tish test#15
spacedevin merged 1 commit into
mainfrom
feat/tish-test

Conversation

@spacedevin

Copy link
Copy Markdown
Owner

Adds the native tish test runner (tish 3.7.1) as a fourth CI layer. Each existing layer proves something the others cannot, so all four stay in npm test:

layer proves
node test/conformance.mjs + coverage.mjs (c8) the published dist/deck.js
test:js-smoke tish build --target js output under node
test:tish language semantics on the Tish VM
cargo test in crate/ the Rust port

What changed

test/conformance.tish and test/smoke.tish were bespoke harnesses — a hand-rolled check() that reported failures with console.log. They are replaced by test/conformance.test.tish and test/smoke.test.tish on tish:test + node:assert/strict, so a failure is an assertion with a diff and a non-zero exit rather than a line of output someone has to spot.

test/conformance.tish is removed rather than left beside its replacement — both ran the same corpus and would have drifted. test/smoke.tish stays: it is the source test:js-smoke compiles, which is a different target rather than a duplicate.

@tishlang/tish ^3.2.2 -> ^3.7.1 (first release carrying the runner).

Test plan

  • npm test — build, coverage, conformance, tish test, JS smoke: all green
  • tish test — 8/8
  • Confirmed the conformance corpus produces identical output on the VM and via the JS emit

Adds the native `tish test` runner (tish 3.7.1) as a fourth CI layer, alongside the three that
already exist. Each proves something the others cannot, and all four stay in `npm test`:

  * `node test/conformance.mjs` + `test/coverage.mjs` (c8) — the compiled `dist/deck.js`
  * `test:js-smoke` — `tish build --target js` output under node
  * `test:tish` — language semantics on the Tish VM
  * `cargo test` in `crate/` — the Rust port

`test/conformance.tish` and `test/smoke.tish` were bespoke harnesses that reported failures with
`console.log` and a hand-rolled `check()`. They are replaced by `test/conformance.test.tish` and
`test/smoke.test.tish` on `tish:test` + `node:assert/strict`, so a failure is an assertion with a
diff and a non-zero exit rather than a line of output someone has to notice.

`test/conformance.tish` is removed rather than left beside its replacement — the two ran the same
corpus, and keeping both invites them to drift. `test/smoke.tish` stays: it is the source
`test:js-smoke` compiles, which is a different target, not a duplicate.

Bumps `@tishlang/tish` to `^3.7.1`, the first release carrying the runner.
@spacedevin
spacedevin merged commit becde52 into main Aug 12, 2026
5 checks passed
spacedevin added a commit that referenced this pull request Aug 27, 2026
…#17)

The Rust crate job has been posting four `##[error]` annotations on green runs:

  ENOENT: opendir '…/crate/target/package/deckfile-0.1.0/tests/trybuild'
  ENOENT: opendir '…/crate/target/package/deckfile-0.1.0/tests/target'

They come from `Post Cache cargo`, not from any build step. `cargo publish
--dry-run` leaves an extracted copy of the crate under `target/package/`, and
that copy has a `tests/` directory (holding `conformance.rs`). rust-cache prunes
`target/` before saving it, sees `tests/`, and goes looking for the trybuild
layout — `tests/target` and `tests/trybuild` — which this crate has never had.

It only surfaces on a cache MISS, because rust-cache skips the prune entirely on
a hit. That is why it looks sporadic: it appeared on #14, not on #15, and again
on #16, each time a change to the emitted crate moved the cache key.

Nothing should be caching the output of a dry-run publish, so remove it once the
check has served its purpose. The check itself is unchanged.

Worth fixing rather than muting: a green run that reports four errors teaches
everyone to skim past annotations, which is when a real one gets missed.
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