Skip to content

Commit

Permalink
Break release if tests are excluded accidentally
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Oct 24, 2018
1 parent 8d0e996 commit a12938c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clean": "rm -rf ./build/",
"generate-changelog": "echo 'Generating changelog...' && ./scripts/changelog > CHANGELOG.md && echo 'Changelog generated.'",
"jshint": "jshint --verbose src/**/*.js test/*.js test/**/*.js",
"release": "npm run --silent generate-changelog && ./scripts/dirty-repo-check && git push && git tag v$(jq -r .version package.json) && git push --tags && npm publish",
"release": "./scripts/reject-excluded-tests && npm run --silent generate-changelog && ./scripts/dirty-repo-check && git push && git tag v$(jq -r .version package.json) && git push --tags && npm publish",
"test": "npm run jshint && npm run clean && mkdir -p build/test && cp -r test/data build/test/data && cd build/test && mocha ../../test/**/*.spec.js"
},
"bin": {
Expand Down
6 changes: 6 additions & 0 deletions scripts/reject-excluded-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -eu
if grep -Er '\.only\(' test; then
echo '!!!'
echo '!!! .only() call found in mocha test code'
echo '!!!'
fi
2 changes: 1 addition & 1 deletion test/lib/filter-properties.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const assert = require('chai').assert;

const filterProperties = require('../../src/lib/filter-properties');

describe.only('filter-properties', () => {
describe('filter-properties', () => {
// GOOD inputs
[
{
Expand Down

0 comments on commit a12938c

Please sign in to comment.