Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 793 Bytes

README.md

File metadata and controls

30 lines (19 loc) · 793 Bytes

jest-expect-har

A Jest custom matcher for asserting valid HAR definitions.

npm Build

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();
});