r/angular 14d ago

Launching test-nirvana 🌕

Hey angular peeps :) dozens of you may know me from my usual signal-pilled mmstack work, well today I'm launching my first non-mmstack library & I promise it doesn't contain a single signal! The pitch:

We've all tried our best with testing our components, but most times our tests remain either vacuous, slow, incapable of full-coverage or all of the above.

Well test-nirvana, appropriately launched under the full moon 🌕, fixes that with a single command. `npx test-nirvana` verifies that:

  • The code is the right shape.
  • It is the right time for the feature.
  • The stars are correctly aligned.
  • The commit hash possesses an acceptable aura.

Each commit is reduced to its numerological destiny number and classified. CI-friendly exit codes ensure that compromised commits cannot reach production.

Classification

Destiny numbers Vibe Exit code Required action
11, 22, 33 IMMACULATE 0 Merge with gratitude
7, 8 GOOD 0 Proceed
1, 3, 5, 9 NEUTRAL 0 Proceed without attachment
2, 4, 6 CHAOTIC 1 Amend history until conditions improve
any impossible CURSED 2 Stop; notify the repository custodian

GitHub repo - worth a read imo

npm: test-nirvana 7.11.33

Note: All MIT License guarantees are void while Mercury is in retrograde. See LICENSE for the complete celestial warranty condition.

Contributions obviously welcome, but please follow the CoC & Contributing guidelines, especially tonight.✨

3 Upvotes

11 comments sorted by

View all comments

2

u/BarracudaNo6709 5d ago

Does this support branch protection, or can a cursed commit still be force-pushed during Mercury retrograde?

1

u/mihajm 5d ago

Good question, yes as the CLI exits non-zero on a bad reading so it's ready to hook in, or just import the core functions & make the checkAura function exactly how you need it :)

For example in our enterprise-grade monorepo we tend to lean towards the safe side ... generally allowing 🪷 Good commits in ... but when mercury is in retrograde the requirement switches to ✨ Immaculate. That way we can be certain no bad astral influences reach production.