January 24, 2022
  • Announcements
  • Stencil
  • stencil

Announcing Stencil v2.13

Anthony Giuliano

Stencil v2.13

The first Stencil minor release of 2022 is here, and it’s a big one. With the release of Stencil v2.13, Stencil now includes support for Jest 27! Jest sits at the core of Stencil testing, so we’ve been working hard to ensure that Stencil continues to support the latest version of Jest. This has been a highly anticipated feature, and we are so excited that it is now available for the Stencil community.

We can’t wait for you to start using Jest 27 in your Stencil projects, but it must be noted that Jest 27 does include some breaking changes. For all the changes included in Jest 27, check out this blog post. With these changes in mind, we want to help make the upgrade process as smooth as possible. To facilitate that, our very own Ryan Waskiewicz has written an upgrade guide.

Please note that Jest 27 itself contains breaking changes. However, if your workflow does not require Jest 27, you can upgrade Stencil seamlessly with no breaking changes. You can upgrade your Stencil version and still use whatever version of Jest you are currently using in your project. We’ve also updated the Stencil starter projects so, from now on, when you run npm init Stencil, your project will automatically use Jest 27 by default.

While we’re really excited about support for Jest 27, it is not the only new feature included in Stencil v2.13. In the spirit of testing, we’ve also improved our MockEvent to support composedPath(). composedPath() is an event method that returns an array of the elements included in the chain of objects on which an event listener will be invoked. For more information on composedPath(), you can check out the MDN docs.

As always, the release notes can be found here. Happy coding!


Anthony Giuliano