Skip to content

Commit

Permalink
Prevent merging exclusive service tests (badges#1926)
Browse files Browse the repository at this point in the history
* Remove an .only() left behind previously
  • Loading branch information
paulmelnikow authored Aug 16, 2018
1 parent 30d7466 commit 9119c23
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 38 deletions.
9 changes: 9 additions & 0 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

const { danger, fail, message, warn } = require('danger');
const chainsmoker = require('chainsmoker');
const { default: noTestShortcuts } = require('danger-plugin-no-test-shortcuts');

const fileMatch = chainsmoker({
created: danger.git.created_files,
Expand Down Expand Up @@ -140,3 +141,11 @@ affectedServices.forEach(function(service) {
);
}
});

// Prevent merging exclusive services tests.
noTestShortcuts({
testFilePredicate: filePath => filePath.endsWith('.tester.js'),
patterns: {
only: ['only()'],
},
});
60 changes: 23 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"classnames": "^2.2.5",
"concurrently": "^3.5.1",
"danger": "^3.7.13",
"danger-plugin-no-test-shortcuts": "^2.0.0",
"dejavu-fonts-ttf": "^2.37.3",
"eslint": "^5.0.1",
"eslint-config-prettier": "^3.0.1",
Expand Down
1 change: 0 additions & 1 deletion services/npm/npm.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ t.create('license when network is off')
// This tests error-handling functionality in NpmBase.
t.create('when json is malformed for scoped package')
.get('/l/@cycle%2Fcore.json')
.only()
.intercept(nock =>
nock('https://registry.npmjs.org')
.get('/@cycle%2Fcore')
Expand Down

0 comments on commit 9119c23

Please sign in to comment.