flex-plugin-utils-jest
TypeScript icon, indicating that this package has built-in type declarations

4.3.4 • Public • Published

npm npm NpmLicense

Flex Plugin Utils Jest

Jest extensions used throughout Flex Plugin Builder

Extension

This library provides the following extensions to Jest

toMatchPath(expected: string)

This method can be used to check for path and is OS agnostic.

// Use symmetrically
expect('/path/to/file1').toMatchPath('/path/to/file1');

// Use asymmetrically
expect(fn).toHaveBeenCalledWith(expect.toMatchPath('/path/to/file1'));

toMatchPathContaining(expected: string)

Similar to toMatchPath but will do partial match

// Use symmetrically
expect('/path/to/file1').toMatchPathContaining('to/file1');

// Use asymmetrically
expect(fn).toHaveBeenCalledWith(expect.toMatchPathContaining('to/file1'));

Contributors

Thank you to all the lovely contributors to this project. Please check the main repository to see all contributors.

License

MIT

Package Sidebar

Install

npm i flex-plugin-utils-jest

Weekly Downloads

5

Version

4.3.4

License

MIT

Unpacked Size

22.4 kB

Total Files

21

Last publish

Collaborators

  • flex-runtime
  • ktalebian
  • twilio-labs-ci