flex-plugin-utils-jest

Flex Plugin E2E Tests framework

Usage no npm install needed!

<script type="module">
  import flexPluginUtilsJest from 'https://cdn.skypack.dev/flex-plugin-utils-jest';
</script>

README

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