Skip to content

Unittests fail in node 6.5.0 #2467

@palortoff

Description

@palortoff

With Node 4 unittests fail:

  1. Suite .beforeAll() wraps the passed in function in a Hook adds it to _beforeAll:
  2. Suite .afterAll() wraps the passed in function in a Hook adds it to _afterAll:
  3. Suite .beforeEach() wraps the passed in function in a Hook adds it to _beforeEach:
  4. Suite .afterEach() wraps the passed in function in a Hook adds it to _afterEach:

All have a similar Error:
AssertionError: expected '"before all" hook: fn' to be '"before all" hook'

Reason:
In node 6.5.0 anomynous functions have a name when assigned to a variable:

var myFunc = function(){};
console.log(myFunc.name); // ->  'myFunc'

Prior to node 6.5.0 the function name would be empty

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions