code:
import { it, before, after, beforeEach, afterEach } from 'arrow-mocha/es5';
import mochawait from 'mochawait';
describe('RoomService', () => {
describe('joinOrCreateRoom', () => {
before((context) => {
context.test = [];
});
it('should create new room with one player', (context) : void => {
context.test.length;
});
});
});
will fail with:
TypeError: Cannot set property 'test' of undefined
This happens, cause mochawait hooks mocha lifecycle as well. But it'd be really cool to use those extensions together.
code:
will fail with:
TypeError: Cannot set property 'test' of undefinedThis happens, cause
mochawaithooks mocha lifecycle as well. But it'd be really cool to use those extensions together.