diff --git a/javascript-esm/package.json b/javascript-esm/package.json index 43e3e6e..6a326cb 100644 --- a/javascript-esm/package.json +++ b/javascript-esm/package.json @@ -8,7 +8,7 @@ "jest": "^29.6.0" }, "scripts": { - "test": "jest --watchAll", + "test": "jest", "start": "node src/index.js" }, "jest": { diff --git a/javascript-esm/script/test b/javascript-esm/script/test index ee53164..8e0454e 100755 --- a/javascript-esm/script/test +++ b/javascript-esm/script/test @@ -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 diff --git a/javascript-esm/src/index.js b/javascript-esm/src/index.js index 0f2f55b..b9ad5ad 100644 --- a/javascript-esm/src/index.js +++ b/javascript-esm/src/index.js @@ -1,3 +1,3 @@ export const pairingTest = () => { - return false; + return true; } \ No newline at end of file diff --git a/javascript-esm/src/index.test.js b/javascript-esm/src/index.test.js index 45c3aee..97dd210 100644 --- a/javascript-esm/src/index.test.js +++ b/javascript-esm/src/index.test.js @@ -1,5 +1,5 @@ import { pairingTest } from './index' -test('a failing test', () => { +test('pairingTest returns true', () => { expect(pairingTest()).toBe(true); }); \ No newline at end of file