Skip to content

Commit 4777adc

Browse files
committed
feature: @putout/plugin-putout: replace-test-message: report with options -> transform with options
1 parent f3deb4c commit 4777adc

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

packages/plugin-putout/lib/replace-test-message/fixture/transform-with-options-fix.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ test('bundler-fasm: apply-debug: transform with options', (t) => {
1111
});
1212
t.end();
1313
});
14+
15+
test('putout: plugin-esm: apply-name-to-imported-file: transform with options: namespace', (t) => {
16+
t.transformWithOptions('namespace', {
17+
name: 'a',
18+
source: './a.js',
19+
});
20+
t.end();
21+
});

packages/plugin-putout/lib/replace-test-message/fixture/transform-with-options.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ test('bundler-fasm: apply-debug: no transform with options', (t) => {
1111
});
1212
t.end();
1313
});
14+
15+
test('putout: plugin-esm: apply-name-to-imported-file: report with options: namespace', (t) => {
16+
t.transformWithOptions('namespace', {
17+
name: 'a',
18+
source: './a.js',
19+
});
20+
t.end();
21+
});

packages/plugin-putout/lib/replace-test-message/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const INCORRECT = {
1919
NO_REPORT_WITH_OPTIONS: /: (no report after transform(\swith options)?|report|transform|no transform|no report)/,
2020
TRANSFORM: /: (transform with options|no report after transform|no transform|report|no report)/,
2121
NO_TRANSFORM: /: (no report after transform|transform|report|no report)/,
22-
TRANSFORM_WITH_OPTIONS: /: (no report after transform|transform|no transform(\swith options)?|report|no report)/,
22+
TRANSFORM_WITH_OPTIONS: /: (no report after transform|no report|report|no transform|transform)(\swith options)?/,
2323
NO_TRANSFORM_WITH_OPTIONS: /: (no report after transform|transform(\swith options)?|no transform|report|no report)/,
2424
};
2525

0 commit comments

Comments
 (0)