A Jest custom matcher for asserting valid HAR definitions.
npm install jest-expect-har --save-dev
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();
});