test.js 463 B

123456789101112131415161718192021
  1. const createTestCafe = require('testcafe');
  2. let testcafe;
  3. let runner;
  4. let failedCount;
  5. createTestCafe().then((tc) => {
  6. testcafe = tc;
  7. runner = tc.createRunner();
  8. return runner
  9. .src('./tests/Sortable.test.js')
  10. .browsers('chrome:headless')
  11. .concurrency(3)
  12. .run();
  13. }).then((actualFailedCount) => {
  14. failedCount = actualFailedCount;
  15. console.log('FAILED COUNT', actualFailedCount)
  16. return testcafe.close();
  17. }).then(() => process.exit(failedCount));