Тэги:
#webdevsimplified #vitest #vite #vitest_js #vite_js #javascript #js #jest #jest_js #jest_javascript #vitest_ts #vite_ts #vitest_typescript #vitest_vs_jest #mocha #mocha_js #mocha_vs_jest #mocha_vs_vitest #chai_vs_vitest #chai #chai_js #chai_ts #chai_vs_jest #testing_js #testing_library_js #javascript_testing #javascript_testing_libraryКомментарии:
Thanks!
Ответитьcan we use Vitesh with NextJS pls make a video on this and latest unit testing video
ОтветитьI have lots of nightmares with configuration files for everything, whether it is Eslint, Tsconfig, BabelRC, webpack, there's pratically no material outside the docs about them, i was having so many issues trying to config jest for react/typescript vite builded projects. and then i found this video, you're a lifesaver.
ОтветитьCan you show us this with a normally setup typescript project. I keep getting errors. When using Vite it is pretty seemless though.
Edit: Wow it just fixed itself after restarting the IDE. A developer problem needs developer solutions lol.
Jesus so fast and helpful information ❤
Ответить👏
Ответитьhi in one folder all of my test file are running parallel , so for testing database conflict data and failed many test.
but when I run one file at a time all test are passing.
how are configure vitest in a way so that it only run one testfile at a time?
Hey nice video, help a lot.
Who to have the `describe`, `expect`, `test`/`it`, etc... global? 😅:)
Hey Kyle, please make a similar video for end to end testing using react native expo+ detox, it would be of great help
ОтветитьHello, whats about vitest + react native? Ty
ОтветитьThanks! 😀 How to persist rendered component between tests to make an e2e test? It resets the rendered component every time ?
ОтветитьWhat's the benefit of using inline-test?
ОтветитьSadly vitest is much slower then jest and this issue is still not solved after a year
Ответитьnpm create vite . already doesn't work for me lol
ОтветитьI never had an issue using import in jest... so it is hard to argue for that to be the reason to switch. I'd be more interested to see how to test UI components with vitest.
Ответитьvitest has been very slow in CI pipeline, supposedly 2-3 times slower than jest. I am surprised no one talking about that. We moved to vitest, saw how slow it is and moved back to jest.
ОтветитьIs vitest faster than jest with SWC (Rust)?
ОтветитьThank you so much) Very helpful!
ОтветитьWhere do I configure vitest for In-source setup on vanilla JS
where do i put "types": "vitest/importMeta"
I'm a simple man, if it's new I install it
ОтветитьWhat import / export issues in Jest?
ОтветитьWhy is Typescript not complaining when you call sum without any arguments? The function should only accept an array with numbers. What am I missing?
ОтветитьI have been struggling for hours trying to setup a react app created with vite and jest until I came across this video. Thank you for this !
Ответитьamazing
ОтветитьJest is very simple already. I’m surprised there is a concern that it’s too complicated. Using babel-jest you can compile down your test code which automatically gives support for modern JS including import/export.
ОтветитьI'd be interested to see how Vitest handles error reporting. Jasmine / Karma is fucking horrible with presenting errors in a comprehensive format. You can spend hours trying to find out what's wrong. Jest has been slightly better over the last year. Wonder how good this is when you're working with subscriptions, fake async zones, state etc.
Ответитьawesome
ОтветитьVite created by vue framework creator 🔥😍
ОтветитьI saw this video and thought it would be cool to use it in node. But it has not been smooth sailing. Can you do a video for vitest on nodejs?
ОтветитьVitest is sooooo fast! I'm loving it!
ОтветитьLove to see a follow up on how mocks work.
Ответитьso, Why Vitest Is Better Than Jest ?????
ОтветитьJest drives me mad. Ill have to play with this! Love Vite!
ОтветитьI'm getting an error "No test suite found in file .../vite.config.ts" Can't seem to find a solution :(
ОтветитьVideo named Why Vitest Is Better Than Jest yet not a single reason to use it besides a single controversial feature
Ответить💯
ОтветитьGood, but frequently transition on every new tech is bad
Ответить"it's superfast, it took only 2ms" to sum 2 and 2 ;/ At least try summing a couple thousand numbers
ОтветитьAm i right that apis are methods properties from a library or framework and URLS like rest
ОтветитьPathfinder visualizer project with Vanilla javascript
ОтветитьPlease make a video on dataset in javascript I am really confused.
Ответитьdoes anyone here not use any testing library, but use only console.assert with conditionals that run in dev but not in prod? seems lot simpler
ОтветитьThis is great, could you make a video about Turborepo implementing Vite and Vitetest?
ОтветитьI'm seeing a lot of frustration from folks that are using Jest and don't see the benefit of converting to Vitest, so I thought I would share my experience when switching over. I'm working on a back-end Node API that exposes a Graphql endpoint, and also a Sveltekit project. I have used Vitest in both.
- When trying to work with Jest (and also Mocha) I experienced huge hurdles in working with ESM and typescript. The "solution" was to maintain a different tsconfig for testing as the production config, which means they could easily migrate away if I wasn't careful. Also modules in testing were compiling to commonjs and for production were compiling to ESM.
- My first attempt to fix this was to use Uvu and TSM together, and I was actually pretty impressed with it. However it is minimal, so any mocking or anything else I was doing needed to be done by hand. This was also an issue for front end testing in Sveltekit. Rather than reinvent the wheel, I gave Vitest a shot and it works great. I was able to get rid of the tsconfig.testing.json file entirely, and still make use of the larger Jest-like API offered by Vitest
- Initial test run performance of Vitest vs Mocha (which was similar to Jest when tested previously) were about the same. Uvu did actually go a bit faster right out of the gate, but not really enough to notice. (half a second or less difference) HOWEVER once the test runner was running in watch mode, Vitest was orders of magnitude faster than Jest and Mocha and about twice as fast as Uvu. I think this has to do with the Hot Module Reloading in Vite.
- When working in Sveltekit, Vitest just worked. Since Vitest uses the same Vite config, this wasn't all that surprising.
Overall I've been happy with Vitest and don't see myself going back to Jest any time soon.
Nice hair style
ОтветитьSorry man, I generally love your videos, but apart from inline testing, which I would generally prefer to avoid, you can do exactly the same as you did with vitest, with just Jest...
Ответитьwhen adding vitest my eslint fail,
Ответить"Why Vitest is Better than Jest", links to a Jest video, and says the API is built on top of Jest. Catchy titles much?
ОтветитьI can't able to install create react app with yarn which step of command i have to follow
ОтветитьVite and Vitest save much time, another solution is Jest with SWC instead Babel, its runs really good too.
Ответить