Skip to content

plugin doesn't work with mochawait #3

@vaukalak

Description

@vaukalak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions