Closed vonagam closed 1 year ago
I think you are right. Unless targeting specifically a nonexistent fieldname (eg: .done('bla', () => {...})
), done should always run at the end of the suite, even if it turned out to be empty, or without any tests actually running. Let me sort it out one moment.
There you go. vest@5.1.1 should have it fixed. https://github.com/ealush/vest/commit/e889bd7606b599efcd0f3344aaef33c0b38d6ba8
Thanks!
If we have this:
We will see "done" being printed.
Now, if we add
vest.optional({foo: true})
beforevest.test
or removevest.test
altogether then the suite will run but there will be no done call.In my use case it was something like
vest.optional({name: data.name === current.name})
to avoid running tests on a name field unless it was changed.