Skip to content

Conversation

@yungsters
Copy link
Contributor

This will make it easier to use arrow functions when writing unit tests that have custom matchers:

beforeEach(() => {
  jest.addMatchers({
    toBeOne() {
      return this.actual === 1;
    }
  });
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't want to write the docs?

@zpao
Copy link
Contributor

zpao commented Apr 9, 2015

Seems fine. Might be worth adding a comment in the code that it will need to be updated if we upgrade to jasmine2. http://jasmine.github.io/2.0/upgrading.html

@DmitrySoshnikov
Copy link
Contributor

Shall we go with this PR? Also, we have the process of upgrading to jasmine2 in #330.

@DmitrySoshnikov
Copy link
Contributor

OK, seems it was merged internally already, so we can add it here.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants