Open jmoses opened 1 year ago
import {expect} from '@playwright/test'
import {omit} from 'lodash-es'
const o = {
field: 'val'
, field2: 'val2'
}
const e = {field: 'val'}
const f = omit(o, ['field2'])
console.log(e)
console.log(f)
expect(e).toStrictEqual(f)
does work as expected
If you filter an object, and try to
strictEqual
it with a POJO with the filtered fields, the assertion fails.I'm not sure where playwright gets it's
expect
library from, and couldn't find out with a few minutes of searching.