Skip to content

Commit

Permalink
test: Test against bundled version, collect coverage from the source.
Browse files Browse the repository at this point in the history
  • Loading branch information
avocadowastaken committed Jul 2, 2021
1 parent ba9d1d1 commit 59f5219
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
cache-key: npm-${{ matrix.os }}-${{ matrix.node }}-

- run: yarn test
- run: yarn cover

- uses: actions/upload-artifact@v2
if: failure()
Expand Down
4 changes: 3 additions & 1 deletion test/utils/execCLI.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import { registerRawSnapshot } from "./registerRawSnapshot";

const DIR = path.dirname(fileURLToPath(import.meta.url));
const ROOT_DIR = path.join(DIR, "..", "..");
const BIN = path.join(ROOT_DIR, "src", "cli.js");
const BIN = process.env.NODE_V8_COVERAGE
? path.join(ROOT_DIR, "src", "cli.js")
: path.join(ROOT_DIR, "dist", "cli.js");

/**
* @param {string} input
Expand Down

0 comments on commit 59f5219

Please sign in to comment.