Skip to content

Commit

Permalink
fix mediator map test case
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoschenkel committed May 14, 2022
1 parent a3c92d9 commit fd44039
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { Context, IContext, IInjector, TypeMatcher } from "@robotlegsjs/core";
import { assert } from "chai";
import { Container, Sprite } from "pixi.js";
import { Container, Sprite, Text } from "pixi.js";
import { MediatorMap } from "../../../../../../src/robotlegs/bender/extensions/mediatorMap/impl/MediatorMap";
import "../../../../../entry";
import { Alpha50PercentHook } from "../support/Alpha50PercentHook";
Expand Down Expand Up @@ -107,7 +107,7 @@ describe("MediatorMap", () => {

it("handler_creates_mediator_for_view_mapped_by_matcher", () => {
mediatorMap
.mapMatcher(new TypeMatcher().allOf(Sprite))
.mapMatcher(new TypeMatcher().allOf(Container))
.toMediator(ExampleDisplayObjectMediator);

mediatorMap.handleView(new Sprite(), Sprite);
Expand All @@ -117,12 +117,12 @@ describe("MediatorMap", () => {
assert.deepEqual(expectedNotifications, mediatorWatcher.notifications);
});

it.skip("handler_doesnt_create_mediator_for_wrong_view_mapped_by_matcher", () => {
it("handler_doesnt_create_mediator_for_wrong_view_mapped_by_matcher", () => {
mediatorMap
.mapMatcher(new TypeMatcher().allOf(Container))
.mapMatcher(new TypeMatcher().allOf(Text))
.toMediator(ExampleDisplayObjectMediator);

mediatorMap.handleView(new Sprite(), null);
mediatorMap.handleView(new Sprite(), Sprite);

const expectedNotifications: string[] = [];

Expand Down

0 comments on commit fd44039

Please sign in to comment.