博文

目前显示的是 四月 9, 2025的博文

Scripting News: Wednesday, April 9, 2025

Wednesday, April 9, 2025 The Cootie Zone # All Trump is doing is making the US the cootie zone. # We won't make anything here and we won't buy anything. # We'll have nice 2025 computers, phones, cars, medicine, lumber, energy, but all the shit we import will break and be used up and we won't be able to replace it. # The rest of the world will wonder why they cared so much about the US, as the world gets along just fine without us. # And that $1 trillion military budget, forget it -- not only did they fire everyone at the IRS, but no one is making any money so there aren't actually any taxes to pay, and there sure as hell aren't any tariffs because no one can afford to buy anything produced anywhere, in the US or the rest of the world. # We become a very sad, poor, sick, uneducated country, but -- Trump will be on Mount Rushmore and his face will be on the $20 bill, which no one sees because no one has $20. # A...

🔥 (#212) Testing in Nuxt, making tests easier to write, and more

图片
Read this on my blog Hey all! Not a whole lot to share this week. I've been enjoying the early spring here with my family as it warms up. A new podcast, some tips, and more as usual. — Michael 🔥 Easy Unit Testing in Nuxt For your unit tests, @nuxt/test-utils lets you opt-in to a Nuxt environment by adding .nuxt. to the filename of your test: ./tests/MyComponent.nuxt.test.ts You can also add a special comment at the top of the file: @ vitest - environment nuxt Or enable the environment for all Vitest tests in your config: // vitest.config.ts import { defineVitestConfig } from '@nuxt/test-utils/config' ; export default defineVitestConfig ({ test : { environment : 'nuxt' }, }; 🔥 Make Testing Easy Testing is important to do, but it can be hard to do. In my experience, good architecture lends itself to easy-to-write tests (or at least, easier -to-write). The inverse is also t...