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

Commit

Permalink
chore(eslint-plugin-formatjs): add output test
Browse files Browse the repository at this point in the history
  • Loading branch information
Long Ho committed Mar 29, 2020
1 parent 27222ab commit ce21d6b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/eslint-plugin-formatjs/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ _({
message: 'Multiple consecutive whitespaces are not allowed',
},
],
output:
"import {_} from '@formatjs/macro';_({defaultMessage: 'a {placeHolder}'})",
},
{
code: "<FormattedMessage defaultMessage='a thing'/>",
Expand All @@ -228,6 +230,7 @@ _({
message: 'Multiple consecutive whitespaces are not allowed',
},
],
output: "<FormattedMessage defaultMessage='a thing'/>",
},
{
code: `
Expand All @@ -240,6 +243,11 @@ _({
message: 'Multiple consecutive whitespaces are not allowed',
},
],
output: `
import {_} from '@formatjs/macro'
_({
defaultMessage: 'a {placeHolder}'
})`,
},
],
});
Expand Down

0 comments on commit ce21d6b

Please sign in to comment.