Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"jest": "^29.5.0"
},
"scripts": {
"test": "jest --watchAll"
"test": "jest"
}
}
10 changes: 8 additions & 2 deletions javascript/script/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash

set -e
set -euo pipefail

yarn test --watch
cd "$(dirname "${BASH_SOURCE[0]}")/.."

if [[ "${1:-}" == "--watch" ]]; then
yarn test --watchAll
else
yarn test
fi
2 changes: 1 addition & 1 deletion javascript/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function pairingTest() {
return false;
return true;
}

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion javascript/src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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

expect(pairingTest()).toBe(true);
});