Skip to content

Commit fc7f321

Browse files
committed
Improve test coverage for pre-set pragma
1 parent 940ed5d commit fc7f321

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/eslint-plugin/test/rules/jsx-import.test.ts

+16
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,22 @@ let ele2 = <div css={{}} />
284284
285285
`.trim()
286286
},
287+
{
288+
settings: { react: { pragma: 'jsx' } },
289+
code: `
290+
import { css } from '@emotion/react'
291+
let ele = <div css={{}} />
292+
`.trim(),
293+
errors: [
294+
{
295+
messageId: 'cssPropWithPragma'
296+
}
297+
],
298+
output: `
299+
import { css, jsx } from '@emotion/react'
300+
let ele = <div css={{}} />
301+
`.trim()
302+
},
287303
{
288304
code: `
289305
/** @jsx jsx */

0 commit comments

Comments
 (0)