@twilio/flex-plugin-utils-jest
v7.1.0
Published
Flex Plugin E2E Tests framework
Downloads
1,279
Maintainers
Readme
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.