Package Exports
- jest-expect-har
- jest-expect-har/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jest-expect-har) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
jest-expect-har
A Jest custom matcher for asserting valid HAR definitions. Also supports Vitest.

Installation
npm install jest-expect-har --save-dev
Usage
import toBeAValidHAR from 'jest-expect-har';
expect.extend({ toBeAValidHAR });
test('should be a valid HAR', () => {
expect(har).toBeAValidHAR();
});
test('should not be a valid HAR', () => {
expect(invalidHar).not.toBeAValidHAR();
});
The usage is nearly identical in Vitest:
import toBeAValidHAR from 'jest-expect-har';
import { expect, test } from 'vitest';
expect.extend({ toBeAValidHAR });
test('should be a valid HAR', () => {
expect(har).toBeAValidHAR();
});
test('should not be a valid HAR', () => {
expect(invalidHar).not.toBeAValidHAR();
});