Skip to content

Commit 40c5d3a

Browse files
KamranAsifjfmengels
authored andcommitted
Missing title leads to tests always passing (#1)
* 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
1 parent ae96ef8 commit 40c5d3a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function testPlugin(jscodeshift, test, plugin) {
2727
// If there is no title, use input as title
2828
if (title && input && !expected) {
2929
expected = input;
30+
input = title;
3031
}
3132
test(title, function (t) {
3233
t.is(runPlugin(plugin, input), expected);

0 commit comments

Comments
 (0)