Jest-like simple interface
See original GitHub issueStarted using chai-jest-snapshot
recently with mocha
, but I fear my colleagues will not like the additional effort of supplying a filepath & name for each snapshot.
Do you have any plans to allow a default / automatic filepath / name so that assertions can simply be made with:
expect(tree).to.matchSnapshot();
I’d love to help out if I can.
P.s. Additionally an easier way to update all snapshots would be nice, but I’ve not had any thoughts about ways to improve it yet. But if it were possible to do so with mocha -u
(or similar, as this is already used for --ui
), that’d be awesome.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Creating Your First Interface - YouTube
Creating Your First Interface. 2.2K views 5 years ago. Qvera. Qvera. 295 subscribers. Subscribe. 8. I like this. I dislike this.
Read more >Testing TypeScript interfaces with jest-mock-extended - Medium
A simple example where we mock an TS interface which is a dependency of a class: import { mock } from 'jest-mock-extended';interface Device ......
Read more >Kav-K/GPT3Discord: A robust, but simple GPT3 ... - GitHub
A robust, but simple GPT3 interface with Discord. Chat just like ChatGPT right inside Discord! Generate beautiful AI art using DALL-E 2!
Read more >How to add global commands to Jest like describe and it?
If you're using typescript for writing jest test, the first thing you'll need to do is declare your new function somewhere: interface ......
Read more >Top 10 Java Unit Testing Frameworks for 2021 - LambdaTest
There is only one loophole or con of JBehave just like any other BDD testing ... like HTMLUnit and Selenium with a simple...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, @truongsinh, I haven’t forgotten about you, I just had a busy weekend. I’ll try to look at this sometime this weekend
Further thoughts:
You could allow users to define some config for how their snapshots will be output e.g.
Possibly allow outputting versions as Jest does (which could be configured by users):