Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-done-callback] false positive with jest-cucumber #1095

Closed
potb opened this issue Apr 28, 2022 · 4 comments
Closed

[no-done-callback] false positive with jest-cucumber #1095

potb opened this issue Apr 28, 2022 · 4 comments

Comments

@potb
Copy link

potb commented Apr 28, 2022

This code leads to a false-positive since a callback is passed to a function named test.
The warning disappears when the test function is renamed to something else.

jest: 27.5.1
eslint-plugin-jest: 26.1.4

import { defineFeature, loadFeature } from "jest-cucumber";

const feature = loadFeature("some/feature");

defineFeature(feature, (test) => {
  test("A scenario", ({ given, when, then }) => {});
});
@G-Rath
Copy link
Collaborator

G-Rath commented Apr 28, 2022

This is a duplicate of #556 - I've got a draft PR up that should be landed "soon", but I'm the meantime you can either call the method something else or not run eslint-plugin-jest on these files per our readme.

@G-Rath G-Rath closed this as completed Apr 28, 2022
@potb
Copy link
Author

potb commented Apr 28, 2022

Alright, thanks.

@G-Rath G-Rath changed the title no-done-callback false positive with jest-cucumber [no-done-callback] false positive with jest-cucumber May 14, 2022
@G-Rath
Copy link
Collaborator

G-Rath commented May 14, 2022

@potb this is now resolved :)

@potb
Copy link
Author

potb commented May 14, 2022

@potb this is now resolved :)

Thanks for letting me know

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

No branches or pull requests

2 participants