-
Notifications
You must be signed in to change notification settings - Fork 2
Missing esx.register of imported component #2
Copy link
Copy link
Open
Description
There are no esx.register call when importing component with import statement.
test('JSX component registration – import', async ({ is }) => {
const src = [
`import React from 'react'`,
`import Foo from './foo'`,
'module.exports = <div><Foo/></div>'
].join('\n')
const esx = [
`const esx = require('esx')()`,
`import React from 'react'`,
`import Foo from './foo'`,
'esx.register({ Foo })',
'module.exports = esx `<div><Foo/></div>`'
].join('\n')
is(convert(src), esx)
})--- wanted
+++ found
const esx = require('esx')()
import React from 'react'
import Foo from './foo'
-esx.register({ Foo })
module.exports = esx `<div><Foo/></div>`Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels