wdio.local.conf.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. const base = require('./wdio.base.conf')
  2. const { CompanionService } = require('./utils')
  3. // Use "npm run test:acceptance:local -- -b chrome" to test in chrome
  4. // "npm run test:acceptance:local -- -b firefox -b chrome" to test in FF and chrome
  5. let prevIsDashB = false
  6. const capabilities = []
  7. process.argv.forEach((arg) => {
  8. if (prevIsDashB) {
  9. capabilities.push({ browserName: arg })
  10. }
  11. prevIsDashB = arg === '-b'
  12. })
  13. // default to testing in firefox
  14. if (capabilities.length === 0) {
  15. capabilities.push({ browserName: 'firefox' })
  16. }
  17. exports.config = Object.assign(base.config, {
  18. capabilities,
  19. // If you only want to run your tests until a specific amount of tests have failed use
  20. // bail (default is 0 - don't bail, run all tests).
  21. bail: 0,
  22. // Set a base URL in order to shorten url command calls. If your url parameter starts
  23. // with "/", then the base url gets prepended.
  24. baseUrl: 'http://localhost',
  25. // Test runner services
  26. // Services take over a specific job you don't want to take care of. They enhance
  27. // your test setup with almost no effort. Unlike plugins, they don't add new
  28. // commands. Instead, they hook themselves up into the test process.
  29. services: ['static-server', new CompanionService()],
  30. // Options to be passed to Mocha.
  31. // See the full list at http://mochajs.org/
  32. mochaOpts: {
  33. ui: 'bdd',
  34. reporter: 'dot',
  35. timeout: 60000
  36. }
  37. })