Neo's Personal Matrix

    @theroyalwhee0/tobelike
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    tobelike

    toBeLike matcher for Jest.

    Installation

    npm install @theroyalwhee0/tobelike

    or

    yarn add @theroyalwhee0/tobelike

    Documentation

    API Documentation

    Supported types:

    • array
    • bigint
    • boolean
    • error
    • integer
    • function
    • null
    • number
    • object
    • string
    • symbol
    • promise
    • undefined

    Example

    expect(new Error()).toBeLike('error');
    expect('test').toBeLike('string');
    expect(100).toBeLike('integer');
    

    Setup

    Add to the Jest configuration.

      setupFilesAfterEnv: [
        '@theroyalwhee0/tobelike'
      ],
    

    Add to global.d.ts for TypeScript

    import '@theroyalwhee0/tobelike';
    

    Testing.

    Running npm run test will run the test suite. Running npm run test-watch will run the test suite in watch mode.

    Reference

    Links

    History

    • v1.0.1 - 2022-06-04
      • Bump version on @theroyalwhee0/liketype.
    • v1.0.0 - 2022-06-02
      • Bump depends for security.
    • v0.0.2 - 2021-03-28
      • Add automatic extend Jest.
      • Fix extending Jest type.
      • Improve documentation.
    • v0.0.1 - 2021-03-28
      • Initial release.

    Legal & License

    Copyright 2021-2022 Adam Mill

    This library is released under Apache 2 license. See LICENSE for more details.

    Keywords

    Install

    npm i @theroyalwhee0/tobelike

    DownloadsWeekly Downloads

    0

    Version

    1.0.1

    License

    Apache-2.0

    Unpacked Size

    33.5 kB

    Total Files

    16

    Last publish

    Collaborators

    • theroyalwhee0