eslint-plugin-jasmine icon indicating copy to clipboard operation
eslint-plugin-jasmine copied to clipboard

support for async matchers

Open bertBruynooghe opened this issue 7 years ago • 4 comments

Feature request

Current behavior?

e.g. await expectAsync(new Promise... triggers 'expectAsync' is not defined

What is the expected behavior? At least it should pass wit

Please mention your node.js, eslint-plugin-jasmine and operating system version. Node: 9 eslint-plugin-jasmine: 2.10.1 os: MacOS, docker node:9-alpine jasmine 3.2.0

bertBruynooghe avatar Oct 16 '18 13:10 bertBruynooghe

I think this would be handled by eslint globals instead.

sidvishnoi avatar Aug 20 '19 11:08 sidvishnoi

@sidvishnoi Can you please elaborate? Is there a way we could it get working now?

bertBruynooghe avatar Aug 20 '19 11:08 bertBruynooghe

This project's readme says:

ESLint itself provides a Jasmine environment for Jasmine's global variables

meaning globals are not handled here.

So, we can add to following to .eslintrc.yml:

globals:
  expectAsync: true

It would be a workaround until https://github.com/sindresorhus/globals/pull/152 is merged and included in eslint

sidvishnoi avatar Aug 20 '19 11:08 sidvishnoi

ok, thx, makes sense.

bertBruynooghe avatar Aug 20 '19 13:08 bertBruynooghe