In vue-test-utils, how can I pass boolean value to slots option

Viewed 68

Here is my test bootstrap code:

mount(Button, {
  slots: ['<child-component enable="ture" />'],
})

the enable prop in child-component expect a boolean value, but when I try to pass boolean value to this component, it tell me:

[Vue warn] Invalid prop: type check failed for prop "enable". Expected Boolean, got String with value "false"

So how can I pass boolean value to slots?

0 Answers
Related