Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Aug 12, 2024
1 parent 815017d commit e52adaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/three/test/unit/src/core/EventDispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ eveDisForTestEvent.addEventListener("bar", e => {
e.foo;
});

// call addEventListener with an unknown event. The typing should allow you listen any unknown event.
// @ts-expect-error
eveDisForTestEvent.addEventListener("baz", e => {
e.type; // $ExpectType "baz"
e.target; // $ExpectType EventDispatcher<TestEvent>
Expand All @@ -53,6 +53,7 @@ eveDisForTestEvent.addEventListener("baz", e => {
// @ts-expect-error
e.bar();
});
// @ts-expect-error
eveDisForTestEvent.addEventListener("NotRegistered", e => {
e.type; // $ExpectType "NotRegistered"
e.target; // $ExpectType EventDispatcher<TestEvent>
Expand Down

0 comments on commit e52adaa

Please sign in to comment.