Mocha - hooks in separate files

时间:2018-01-15 18:18:37

标签: mocha

I am trying to put methods beforeEach and afterEach to a separate files because I will use them a lot.

I can not find a way to do this & will work. Can you help me out?

This is my working code:

describe('something', function () {
  beforeEach(function () {
    console.log('beforeEach');
  });

  afterEach(function () {
    console.log('afterEach');
  });

  it(...);
});

0 个答案:

没有答案