Skip to content

Comparison functions don't close local variables #1

Description

@nevernormal1

If you have a block like this:

const FOO = "BAR";
check(thing, function(thing) {
  thing == FOO;
});

You'll get an error that FOO is not defined. This can make it awkward to refer to constants or other useful local variables inside check tests.

Note: I've shown the FOO variable being very close to the comparison function, but it would probably be higher up (at the top of the file or in a beforeEach block) in a real example.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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