MtoMatchInlineSnapshot
Bun

method

test.MatchersBuiltin.toMatchInlineSnapshot

value?: string
): void;

Asserts that a value matches the most recent inline snapshot.

@param value

The latest automatically-updated snapshot value.

expect("Hello").toMatchInlineSnapshot();
expect("Hello").toMatchInlineSnapshot(`"Hello"`);
propertyMatchers?: object,
value?: string
): void;

Asserts that a value matches the most recent inline snapshot.

@param propertyMatchers

Object containing properties to match against the value.

@param value

The latest automatically-updated snapshot value.

expect({ c: new Date() }).toMatchInlineSnapshot({ c: expect.any(Date) });
expect({ c: new Date() }).toMatchInlineSnapshot({ c: expect.any(Date) }, `
{
  "v": Any<Date>,
}
`);