Vue-test-declarative - A new way to test your components!

Hello all, I’ve created a tool called vue-test-declarative to write component tests in a new way. I’ve created a new file format, .vuetest, that allows you to write units tests - declaratively!

Here is an example test:

<it will="add a todo">
  <set selector=".new-todo" value="First" />
  <trigger selector=".new-todo" event="keyup.enter" />
  <expect text-of=".todo-list li" to-match="First" />
  <expect text-of=".todo-count" to-match="1 item left" />

And yes, you can add a <script> tag, like in a .vue file, to bind data/props to your declarative tests. :grinning:

Much more detail in the github repo.

1 Like

Wow, looks very interesting, just finished reading the documentation in Github, looks cool :star_struck:

I haven’t gotten to the formal testing part of my app development life cycle, but I am tagging this post for future usage.