Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Zombiejs cucumberjs上传文件错误_Node.js_Zombie.js_Cucumberjs - Fatal编程技术网

Node.js Zombiejs cucumberjs上传文件错误

Node.js Zombiejs cucumberjs上传文件错误,node.js,zombie.js,cucumberjs,Node.js,Zombie.js,Cucumberjs,我正在使用cucumberjs进行Node/React/Redux项目的测试。我使用页面设置测试。我有一些基本的僵尸测试,用于点击按钮、填写表单、断言文本等。这些库非常棒,适用于基本用例 我的文件上传页面有问题。该页面在手动测试中运行良好。以下是我如何在cuc测试中附加该文件: browserShare.attach('input[type=file]', 'features/csv_files/amex-5.csv'); browserShare.assert.text('.alert',

我正在使用cucumberjs进行Node/React/Redux项目的测试。我使用页面设置测试。我有一些基本的僵尸测试,用于点击按钮、填写表单、断言文本等。这些库非常棒,适用于基本用例

我的文件上传页面有问题。该页面在手动测试中运行良好。以下是我如何在cuc测试中附加该文件:

 browserShare.attach('input[type=file]', 'features/csv_files/amex-5.csv');
 browserShare.assert.text('.alert','File selected: amex-5.csv');
运行测试时,控制台会出现以下错误:

Unhandled promise rejection [ReferenceError: FileReader is not defined]
我的问题是:这是将文件附加到输入的正确方法吗?我对zombie/cucumber脚本做了什么错误吗?希望有人能提供帮助,如果您需要更多的代码示例,请告诉我,它的设置基本上与上面的github链接相同。提前谢谢