module.exports = () => {
describe('Voice input test at Main Page', function() {
it('should able to speak show me basf and go to Main Page', function () {
if(Main.mic.waitForExist()) {
browser
.touchAction('~f', 'longPress')
.call(playAudio)
.touchAction('~f', 'release');
however, when I run my test, I got the ERROR: Cannot find module 'react-native'
how do I setup mocha to enable me to call method from react-native-module.
In my test.spec.js file, I want to call the play method from the react-native-sound module from the playAudio function
import Sound from 'react-native-sound'; function playAudio() { _player = new Sound('my.wav', Sound.DOCUMENT, (error) => { .....
..... if (_player && _player.release) { _player.release(); } }); }); }
module.exports = () => { describe('Voice input test at Main Page', function() { it('should able to speak show me basf and go to Main Page', function () { if(Main.mic.waitForExist()) { browser .touchAction('~f', 'longPress') .call(playAudio) .touchAction('~f', 'release');
however, when I run my test, I got the ERROR: Cannot find module 'react-native'
how do I setup mocha to enable me to call method from react-native-module.