Jest allows passing a snapshot name to snapshot matchers such as toMatchSnapshot and co, e.g.
expect(obj).toMatchSnapshot('inital state')
expect(obj).toMatchSnapshot('state after reload')
The full test name in that case is suffixed with : ${hint}.
exodus-test always assumes the passed argument to be a property matcher and disregards the overloaded signature
https://github.com/ExodusMovement/test/blob/eec3fa51c377cf1f075c23b32019f1907b7b055f/src/jest.snapshot.js#L113-L120
So before even attempting to extract the snapshot from the snapshot file, exodus-test throws in this line because it passes a string to toMatchObject
for reference, these are the supported signatures in jest
{
toMatchSnapshot<U extends { [P in keyof T]: any }>(propertyMatchers: Partial<U>, snapshotName?: string): R;
toMatchSnapshot(snapshotName?: string): R;
}
Jest allows passing a snapshot name to snapshot matchers such as
toMatchSnapshotand co, e.g.The full test name in that case is suffixed with
: ${hint}.exodus-test always assumes the passed argument to be a property matcher and disregards the overloaded signature
https://github.com/ExodusMovement/test/blob/eec3fa51c377cf1f075c23b32019f1907b7b055f/src/jest.snapshot.js#L113-L120
So before even attempting to extract the snapshot from the snapshot file, exodus-test throws in this line because it passes a string to
toMatchObjectfor reference, these are the supported signatures in jest