Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Some more false negative for testing-library/prefer-screen-queries #391

Open
Labels
enhancementNew feature or request pinnedPinned for different reasons. Issues with this label won't be flagged as stale by stalebot
@julienw

Description

Hey @Belco90
I just upgraded to the new version that fixed #367, and I am reporting that it indeed reported new cases...but not all of them!

For example these cases aren't reported still: https://github.com/firefox-devtools/profiler/blob/1c5dfed055f864413b3a62e43ca2d27b074d6108/src/test/components/CallNodeContextMenu.test.js#L107-L112

I'm pretty sure this is because of the spread operator. And indeed I reproduced by slightly adjusting one of the smaller testcases:

import * as React from 'react';
import { render } from 'firefox-profiler/test/fixtures/testing-library';
function setup() {
 const result = render(<div />);
 return { ...result };
}
it('detected', async () => {
 const { getByText } = await setup();
 expect(getByText('foo')).toBeInTheDocument(); // detected
});
it('undetected', () => {
 const { getByText } = setup();
 expect(getByText('foo')).toBeInTheDocument(); // undetected
});

Hope this helps :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request pinnedPinned for different reasons. Issues with this label won't be flagged as stale by stalebot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /