CFP is open for @revojsro, a conference in Timișoara, Romania, happening this October. I've submitted a proposal myself, hoping for the best🤞🏼
revojs.ro/2023/cfp/
@zaboco Ah, TypeScript! The superhero swooping in to save us from JavaScript's wild world of missing types and undefined chaos! why not give Rust a try?
In #rust, you wrestle with errors in a pre-compile smackdown, but in #javascript you're juggling bugs on the live stage! Which battle do you prefer? ⚔️
@zack_overflow Or another way would be to have something like pattern matching on the states. I actually made a POC for a typed state-machine myself (old and unmaintained 😅): github.com/zaboco/typed-m…. And gave a talk about it. You might find it interesting. youtube.com/watch?v=gcuZJ2…
@zack_overflow The only thing to improve here is to also restrict the legal actions at a type level. For example, in the "idle" state `actions.disconnect` should be a type error. One way to do that would be to have `actions` on the `state` itself, so it can be discriminated.
Do you like state machines and type-safety? I wanna share a wip library I'm building to make working with state machines easier and more type safe in typescript.
It's like XState.js had a baby with Zustand
lemme walk u thru how it works
What just happened. So much more than I thought it would be. Incredible discussions, incredible people. Thank you @AgentConf for making my first frontend conference so magical. Time to build some open source things!
#AgentConf
@mshilman@oliveira_phc@storybookjs You're right, it's not such a solid case. Except maybe consistency. E.g. using vi.fn() in all tests, not just in vitest
@zaboco@oliveira_phc@storybookjs I understand the desire to replace jest in the test runner (2). What's the case for replacing jest libraries in the play function (1)? We provide standalone libraries for these functions that don't bring the rest of jest into it.
Find untested edge cases!
Storybook test runner now generates coverage reports to show you exactly which lines of code are tested.
🧩 Easy to setup via addon
✅ Supports React, Vue, Svelte, Preact, WC & more
🧰 Babel & Vite compatible
⚙️ Customizable
storybook.js.org/blog/code-cove…
@oliveira_phc@mshilman@storybookjs There are two parts to this, from my understanding. Jest is used 1) in the Play functions as an instrumented API (for expect, jest.fn, etc) and 2) in the test-runner along with Playwright. For 1) it could easily be replaced, assuming the new functions are instrumented.
@zaboco@mshilman@storybookjs Thank you. I am already using Vitest for integration tests with JSDOM. I tried to use it inside the play function of StoryBook, but I couldn’t.
@mshilman@oliveira_phc@storybookjs An option to consider in the future might be vitest.dev (once it's v1). It would align well with the vite-builder for Storybook (which is great 🚀)
@oliveira_phc@storybookjs We’re using Jest’s “transform” feature to rewrite your stories as tests. As far as I know playwright/test does not support something similar yet.
That said, we’ve mostly hid Jest as an implementation detail, so we could potentially swap it out later.
My talk from @jsheroes is online 🎉. It was really nice being on stage again. And the whole conference was a great experience, as usual. youtube.com/watch?v=_r0CGn…
🎉 Happy IE11 End of Life Week everybody!!!
Reminder that Microsoft is deprecating IE11 starting *THIS WEDNESDAY*
docs.microsoft.com/en-us/lifecycl…
Press F to pay respects