Skip to content

javascript: Fix failing test and make script/test exit non-interactively - #154

Open
adamnfish-gu wants to merge 1 commit into
platform/tool-versions-cifrom
fix/javascript
Open

javascript: Fix failing test and make script/test exit non-interactively#154
adamnfish-gu wants to merge 1 commit into
platform/tool-versions-cifrom
fix/javascript

Conversation

@adamnfish-gu

@adamnfish-gu adamnfish-gu commented Aug 7, 2026

Copy link
Copy Markdown

pairingTest() returned false while the test expected true. It now returns true, and the test is named for what it checks.

package.json ran jest --watchAll and script/test added --watch, so the runner never exited. package.json now runs plain jest and script/test takes an explicit --watch flag.


Base platform/tool-versions-ci (#144), so the diff shows only this branch's changes. Merge #144 first.

Part of #143.

pairingTest() returned false while the test expected true. It now returns
true, and the test is named for what it checks.

package.json ran `jest --watchAll` and script/test added --watch, so the
runner never exited. package.json now runs plain jest and script/test takes
an explicit --watch flag.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
const { pairingTest } = require('.');

test('a failing test', () => {
test('pairingTest returns true', () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the intent here seems to have changed, as well as the behaviour

it looks to me as though originally this was meant to be a failing test, along the lines of "Red-Green TDD", to verify that the test setup is actually working.

if we're adding a CI step that runs the tests then this is a good reason to switch to using a passing test rather than a failing one, but as this goal isn't mentioned in the PR description I thought it worth flagging

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.

2 participants