You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
The matchers are not visible in auto-completion when used with expect.not. They work, but WebStorm reports them as a problem.
const value = {
name: 'foobar',
};
expect(value).toEqual({
name: expect.not.toStartWith('bar')
^^^^^^^^^^^
Unresolved function or method
});
The simplest way to expose them is by declaring the asymmetric forms in a new interface, AsymmetricMatchers, and having both Expect and InverseAsymmetricMatchers extend it. However, this may cause issues with TypeScript projects. In that case, I think we'd have to declare the matchers a third time.
The matchers are not visible in auto-completion when used with
expect.not
. They work, but WebStorm reports them as a problem.The simplest way to expose them is by declaring the asymmetric forms in a new interface,
AsymmetricMatchers
, and having bothExpect
andInverseAsymmetricMatchers
extend it. However, this may cause issues with TypeScript projects. In that case, I think we'd have to declare the matchers a third time.Here's how I do it for my own custom matchers:
The text was updated successfully, but these errors were encountered: