0

I am using Chimp.js(with Cucumber.js) and all the tests need to pass a login page.

I know webdriverIO uses testrunner config file for something like .before() and .after().

How would be the best way to achieve that with Chimp?

Thanks!

Sotir
  • 13
  • 2

1 Answers1

1

You can use Cucumber.js before and after hooks with Chimp:

// tests/features/clearDatabase.js
var clearDatabase = function() {

  this.Before(function() {
    server.call('/fixtures/clearDatabase');
  });

};

module.exports = clearDatabase;
  • It might be better to put this code into a sub-folder like "tests/features/_support/hooks/before_hooks.js" as it is not a feature. – Omnicon Feb 16 '17 at 02:04