test: Add tests for some runtime helpers (#87)

* test for `renderList`
* test for `toHandlers`
This commit is contained in:
Jordan Pittman
2019-10-05 23:22:42 -04:00
committed by Evan You
parent c4f9b6d592
commit a8c82909fa
3 changed files with 72 additions and 2 deletions

View File

@@ -57,11 +57,12 @@ export function mockWarn() {
found++
}
})
if (found > 0) {
if (found === n) {
return {
pass: true,
message: () =>
`expected "${received}" not to have been warned ${n} times.`
`expected "${received}" to have been warned ${n} times.`
}
} else {
return {