So, what’s a JavaScript test? It’s simply some code which sets up some state, performs some action, and makes an assertion on the new state.
But really, what is a JavaScript test?
Kent C. Dodds
1.9K8

I’d argue that this definition could be extended to also apply for testing data models and user inputs.

At Fiverr we’ve been working on Passable, a testing framework for data models. It looks indistinguishable from a regular test (other than a few different keywords), internally working pretty much the same way you described — only running in production code, and not in dev/CI.

What are your thoughts on this approach for testing?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.