1.0.7 • Published 3 years ago
jasmine-equal-value v1.0.7
Jasmine Deep Value Equal
This package extends the global matchers to include toEqualValue. Allows you to expect deep value equality. It uses isEquals from lodash, but ignores function and prototype checking.
Setup (Typescript Example)
All you need to do is import jasmine-equal-value as a jasmine helper.
npm i jasmine-equal-value -D
// setup.ts
import 'jasmine-equal-value';
// jasmine.config.json
{
"helpers": [
"setup.ts",
],
}
describe('', () => {
it('', () => {
class Test { constructor(public test: string) { } }
expect(new Test('foo')).toEqualValue({ test: 'foo' }); // true
})
});