Skip to content
This repository was archived by the owner on May 4, 2020. It is now read-only.

Commit ce21d6b

Browse files
author
Long Ho
committed
chore(eslint-plugin-formatjs): add output test
1 parent 27222ab commit ce21d6b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/eslint-plugin-formatjs/tests/index.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ _({
220220
message: 'Multiple consecutive whitespaces are not allowed',
221221
},
222222
],
223+
output:
224+
"import {_} from '@formatjs/macro';_({defaultMessage: 'a {placeHolder}'})",
223225
},
224226
{
225227
code: "<FormattedMessage defaultMessage='a thing'/>",
@@ -228,6 +230,7 @@ _({
228230
message: 'Multiple consecutive whitespaces are not allowed',
229231
},
230232
],
233+
output: "<FormattedMessage defaultMessage='a thing'/>",
231234
},
232235
{
233236
code: `
@@ -240,6 +243,11 @@ _({
240243
message: 'Multiple consecutive whitespaces are not allowed',
241244
},
242245
],
246+
output: `
247+
import {_} from '@formatjs/macro'
248+
_({
249+
defaultMessage: 'a {placeHolder}'
250+
})`,
243251
},
244252
],
245253
});

0 commit comments

Comments
 (0)