Skip to content

Commit

Permalink
Missing title leads to tests always passing (#1)
Browse files Browse the repository at this point in the history
* Missing title leads to tests always passing

testChanged('a', 'b') => 
createTest(title='a', input='b', expected=undefined)

before:
title='a'
input='b'
expected='b'

after:
title='a'
input='a'
expected='b'

* Fixing order
  • Loading branch information
KamranAsif authored and jfmengels committed Jan 14, 2017
1 parent ae96ef8 commit 40c5d3a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function testPlugin(jscodeshift, test, plugin) {
// If there is no title, use input as title
if (title && input && !expected) {
expected = input;
input = title;
}
test(title, function (t) {
t.is(runPlugin(plugin, input), expected);
Expand Down

0 comments on commit 40c5d3a

Please sign in to comment.