Skip to content

Commit

Permalink
enabled GH test reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 28, 2024
1 parent ac4d6fb commit eb177af
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/bin/sh

node --no-warnings=ExperimentalWarning test.js setup
NODE="node --no-warnings=ExperimentalWarning"
$NODE test.js setup

if [ "$1" = "watch" ]; then
node --no-warnings=ExperimentalWarning --test --watch
$NODE --test --watch
else
node --no-warnings=ExperimentalWarning --test
# npx mocha --exit --no-warnings=ExperimentalWarning lib/*.test.js routes/*.test.js
if [ -n "$GITHUB_WORKFLOW" ]; then
npm i --no-save node-test-github-reporter
$NODE --test --test-reporter=node-test-github-reporter
else
$NODE --test --test-reporter=spec
fi
fi

node --no-warnings=ExperimentalWarning test.js teardown
# npx mocha --exit --no-warnings=ExperimentalWarning lib/*.test.js routes/*.test.js

$NODE test.js teardown

0 comments on commit eb177af

Please sign in to comment.