I can't figure out why (or if it's not allowed) testcafe won't run my runner class file. Current setup
package.json:
{
...
"test:integration": "testcafe ./bin/integration.js",
...
"devDependencies": {
...
"testcafe": "^1.5.0",
"testcafe-react-selectors": "^3.2.0",
...
}
bin/integration.js (bin on level of package.json)
const createTestCafe = require('testcafe')
let runner = null
let testcafe = null
createTestCafe('localhost', 1337, 1338)
.then(tc => {
testcafe = tc
runner = testcafe.createRunner()
return testcafe.createBrowserConnection()
})
.then(remoteConnection => {
// Outputs remoteConnection.url so that it can be visited from the remote browser.
console.log('remote url:', remoteConnection.url)
remoteConnection.once('ready', () => {
runner
.src('../integration-tests/*test.js*')
.browsers(['chrome'])
.run({
selectorTimeout: 50000,
assertionTimeout: 7000,
pageLoadTimeout: 8000
})
.then(failed => {
console.log('failed tests:', failed)
testcafe.close()
})
.catch(error => {
console.log(error)
})
})
})
Error received:
ERROR Unable to find the browser. "./bin/integration.js" is not a browser alias or path to an executable file.
What am I doing wrong?
Thanks in advance