-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I'm trying to use enzyme following this example for my RN project.
I have two components, say SomeButton
and SomeText
and they are not in the same directory.
/**
* @providesModule SomeButton
*/
'use strict'
import React from 'react'
import {
View
} from 'react-native'
module.exports = () => {
return (
<View></View>
)
}
/**
* @providesModule SomeText
*/
'use strict'
import React from 'react'
import {
View
} from 'react-native'
import SomeButton from 'SomeButton'
module.exports = () => {
return (
<View>
<SomeButton />
</View>
)
}
I use @providesModule
so that I can just import a component without specifying the path. But this doesn't work with enzyme.
module.js:442
throw err;
^
Error: Cannot find module 'SomeButton'
Any idea how to solve this? aside from not using @providesModule
Metadata
Metadata
Assignees
Labels
No labels