Created
March 15, 2018 14:10
-
-
Save AndreyBelym/614ee61d50cec126981aa8f6ee20a47a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const createTestCafe = require('testcafe'); | |
let runner = null; | |
process.on('unhandledRejection', e => console.log(e.stack)); | |
createTestCafe('localhost', 1337, 1338) | |
.then(testcafe => { | |
runner = testcafe.createRunner(); | |
return runner | |
.src('tests/myFixture.js') | |
.browsers('chrome') | |
.reporter('spec') | |
.run() | |
.then(failedCount => { | |
/* ... */ | |
}) | |
.catch(error => { | |
/* ... */ | |
}) | |
.then(() => { | |
return testcafe.close(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment