Skip to content

Commit 1b3073b

Browse files
committed
feature: @putout/plugin-tape: convert-called-with-no-args-to-called-with: second arg object
1 parent a60400e commit 1b3073b

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
t.calledWith(beforeHide, [{
2+
state,
3+
}]);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
t.calledWithNoArgs(beforeHide, {state});

packages/plugin-tape/lib/convert-called-with-no-args-to-called-with/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ export const replace = () => ({
55
't.calledWithNoArgs(__a, __array, __b)': 't.calledWith(__a, __array, __b)',
66
't.calledWithNoArgs(__a, __identifier)': 't.calledWith(__a, __identifier)',
77
't.calledWithNoArgs(__a, __identifier, __b)': 't.calledWith(__a, __identifier, __b)',
8+
't.calledWithNoArgs(__a, __object)': 't.calledWith(__a, [__object])',
89
});

packages/plugin-tape/lib/convert-called-with-no-args-to-called-with/index.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ test('plugin-tape: convert-called-with-no-args-to-called-with: transform: identi
2121
t.transform('identifier');
2222
t.end();
2323
});
24+
25+
test('plugin-tape: convert-called-with-no-args-to-called-with: transform: message-object', (t) => {
26+
t.transform('message-object');
27+
t.end();
28+
});

0 commit comments

Comments
 (0)