Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

No-unbound-method warn when tested 'toHaveBeenCalled' in test #4500

Closed
VincentLanglet opened this issue Feb 4, 2019 · 2 comments
Closed

Comments

@VincentLanglet
Copy link
Contributor

Bug Report

  • TSLint version: 5.12.0
  • TypeScript version: 3.3.1
  • Running TSLint via: CLI

TypeScript code being linted

expect(localStorage.getItem).toHaveBeenLastCalledWith('token');

with tslint.json configuration:

{
  "extends": ["tslint:all"]
}

Actual behavior

Avoid referencing unbound methods which may cause unintentional scoping of 'this'.

Expected behavior

No error

@JoshuaKGoldberg
Copy link
Contributor

Good news, @VincentLanglet - duplicate of #3755, which was resolved by #4472!

@VincentLanglet
Copy link
Contributor Author

@JoshuaKGoldberg Great !
Sorry for the duplicate

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants