You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider an empty emitter function:
```ts
@component
class MyComponent {
@emit
public foo(): void {}
}
```
We would expect this to emit a `'foo'` event with no arguments (since
the return value is `undefined`).
However, when testing with `@vue/test-utils`, we have to write:
```ts
expect(component.emitted('foo')).to.eql([[undefined]])
```
But it would be nicer - and more consistent with
[`vue-property-decorator`][1] - if we instead called `$emit()` with no
arguments in this case to be able to write:
```ts
expect(component.emitted('foo')).to.eql([[]])
```
[1]: https://github.com/kaorun343/vue-property-decorator/blob/e04872349bab357e6d08b01442f83abc9976eb50/src/decorators/Emit.ts#L22
0 commit comments