vitest-plugin-set weekly downloads statistics
By OutOfOrder (3 listings) · npm · Testing
Declarative JS tests with lazy evaluation using vitest.
vitest-plugin-set has 1 recorded weekly downloads on npm, a decrease of 85.7% over the past 30 days.
It ranks #2222 of 2,251 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by 0.0%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About vitest-plugin-set
vitest-plugin-set
Declarative JS tests with lazy evaluation for vitest.
Getting Started
Install vitest-plugin-set using yarn:
Motivation
RSpec took the ruby world by storm with its declarative method of TDD. Since moving to JavaScript, I've wanted a similar way of declaring the setup for my tests. Here's what you would normally do to declare a test:
Some notes:
1. Because of scoping in javascript, we have to declare our variables outside the beforeEach blocks in order to reference them. 2. Our beforeEach blocks contain _all_ of the setup code necessary which in this trivial example is at least 3 lines per test. 3. We can override variables in nested scopes, but following the chain is non-trivial because the actual variable declaration might be several layers up.
Here's what the same tests look like with using set from vitest-plugin-set:
Even in this trivial example, things are much easier to follow.
1. We can declare firstName and lastName as variables that we can then reference in our beforeEach blocks. 2. We can break up the large beforeEach blocks into several distinct set blocks. 3. We can easily set defaults in outer scopes (which may or may not be used within a particular test saving performance) and then overriding the values in nested blocks.
Why set?
In JavaScript, let is a keyword so the next closest word is...set (which still keeps the meaning of what we're doing
• settings variables (lazily)).
Usage
If you want, you can import set from vitest-plugin-set at the top of every test:
If you want to install set as a global, you can modify the test section of your vitest.config.js to include:
Example
Here's an example test that tests set itself:
Description from the npm listing.
- declarative
- let
- set
- tdd
- vitest
- vitest-plugin
- plugin
- test
Where vitest-plugin-set sits in the listing
Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (121)Similar npm Testing plugins
Data source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/vitest-plugin-set. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.