Skip to content

Instantly share code, notes, and snippets.

@AndreyBelym
Created March 15, 2018 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndreyBelym/614ee61d50cec126981aa8f6ee20a47a to your computer and use it in GitHub Desktop.
Save AndreyBelym/614ee61d50cec126981aa8f6ee20a47a to your computer and use it in GitHub Desktop.
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