You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Jest inline shapshots are like file-based snapshots but much more casual. I love using them for small snapshots and I think they'd be a great improvement to Deno. From Jest's docs, they look like:
it('renders correctly',()=>{consttree=renderer.create(<Linkpage="https://example.com">ExampleSite</Link>).toJSON();expect(tree).toMatchInlineSnapshot(`<a className="normal" href="https://example.com" onMouseEnter={[Function]} onMouseLeave={[Function]}> Example Site</a>`);});
The Deno version might look like:
Deno.test("renders correctly",async()=>{consttree=renderer.create(<Linkpage="https://example.com">ExampleSite</Link>).toJSON();awaitassertInlineSnapshot(`<a className="normal" href="https://example.com" onMouseEnter={[Function]} onMouseLeave={[Function]}> Example Site</a>`);});
Describe alternatives you've considered
Right now, I just stick to the file-based snapshots which works fine but I find the locality of the inline snapshots much quicker to iterate on and they feel lightweight. I tend to avoid manual assertions more than a property or two as they're cumbersome to update.
The text was updated successfully, but these errors were encountered:
I too want this functionality. An additional benefit to inline snapshots is that read permissions only need to be granted along with write permissions when running --update, otherwise the expected value is inlined which means in CI/CD checks the read permission is not necessary unlike with external snapshots.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Jest inline shapshots are like file-based snapshots but much more casual. I love using them for small snapshots and I think they'd be a great improvement to Deno. From Jest's docs, they look like:
The Deno version might look like:
Describe alternatives you've considered
Right now, I just stick to the file-based snapshots which works fine but I find the locality of the inline snapshots much quicker to iterate on and they feel lightweight. I tend to avoid manual assertions more than a property or two as they're cumbersome to update.
The text was updated successfully, but these errors were encountered: