jest-plugins icon indicating copy to clipboard operation
jest-plugins copied to clipboard

[jest-plugin-set] Eslint support?

Open hakunin opened this issue 4 years ago • 2 comments

Description

Eslint will complain about undefined variabels when using jest-plugin-set. Is there a way to work around that? So far I've had to turn the no-undef rule off for my tests.

Screenshot

xyz/models/__tests__/Plan-test.js
  32:23  error  'organization' is not defined  no-undef
  32:40  error  'free_plan' is not defined     no-undef
  35:39  error  'organization' is not defined  no-undef
  36:17  error  'free_plan' is not defined     no-undef

✖ 4 problems (4 errors, 0 warnings)

hakunin avatar Mar 14 '20 07:03 hakunin

@hakunin any quick workarounds for this? It's quite annoying 🤔

bjufre avatar Apr 28 '20 14:04 bjufre

@bjufre What we're doing is we've disabled the no-undef in our test files for now.

hakunin avatar Apr 29 '20 08:04 hakunin