8.0.1 • Published 2 months ago
jest-expect-har v8.0.1
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();
});
8.0.1
2 months ago
8.0.0
2 months ago
7.1.2
2 months ago
7.1.1
6 months ago
7.1.0
1 year ago
7.0.0
2 years ago
6.0.0
2 years ago
5.0.0
3 years ago
4.0.0
3 years ago
3.0.2
3 years ago
3.0.1
3 years ago
3.0.0
3 years ago
2.0.3
4 years ago
2.0.2
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago