Skip to content

Commit

Permalink
tests ~ use --test-dist instead of --test-for-dist to enable dist…
Browse files Browse the repository at this point in the history
…ribution tests
  • Loading branch information
rivy committed Feb 14, 2021
1 parent df474a6 commit 5a9bd9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@
"_:version:spell:changelog_update": "run-s --silent _:exists:git-changelog && git changelog -u | cspell stdin --config \".vscode/cspell.json\" || shx echo \"[lint] WARN CHANGELOG update `cspell` exception\" 1>&2",
"_:version:update:changelog": "run-s --silent _:exists:git-changelog && node -e \"v=require('./package.json').version; result=require('child_process').spawnSync('git changelog --next-tag v'+v,{shell:true,encoding:'utf-8'}); if (result.status != 0) {console.error('ERR! '+result.stderr); process.exit(1);} else {require('fs').writeFileSync('CHANGELOG.mkd',result.stdout);};\" || shx echo \"[version] WARN CHANGELOG not updated\" 1>&2",
"## lifecycle scripts ##": "",
"prepublishOnly": "npm run clean && npm run test --test-for-dist && run-s --silent update _:vcs-strictly-clean-err",
"preversion": "run-s --silent _:version:spell:changelog_update && npm run test --test-for-dist",
"prepublishOnly": "npm run clean && npm run test --test-dist && run-s --silent update _:vcs-strictly-clean-err",
"preversion": "run-s --silent _:version:spell:changelog_update && npm run test --test-dist",
"version": "run-s --silent _:version:update:changelog && run-s lint:spell && run-s --silent update:dist && git add CHANGELOG.mkd dist"
},
"dependencies": {},
Expand Down
4 changes: 3 additions & 1 deletion test/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ test('api', (t) => {
});

// test examples with version changes or distribution
if (process.env.npm_config_test_for_dist) {
if (!process.env.NPM_CONFIG_TEST_DIST) {
test('skipped example testing (enable with `--test-dist`)', (t) => t.pass());
} else {
if (!commandExists.sync('deno')) {
test.skip('`deno` not found; Deno examples not tested', (t) => {
t.pass();
Expand Down

0 comments on commit 5a9bd9c

Please sign in to comment.