温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/bun/test/Expect/anything
点击访问原文链接

Expect.anything method | bun:test module | Bun

Expect.anything method | bun:test module | BunBuildDocsReferenceGuidesBlogDiscord/bun:test/Expect/anythingManything

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/bun:test/Expect/anythingManything

method

test.Expect.anythinganything(): any;Matches anything but null or undefined. You can use it inside toEqual or toBeCalledWith instead of a literal value. For example, if you want to check that a mock function is called with a non-null argument:

test('map calls its argument with a non-null argument', () => { const mock = jest.fn(); [1].map(x => mock(x)); expect(mock).toBeCalledWith(expect.anything()); });

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco

We're hiring →

智能索引记录