Skip to content

Commit 140f201

Browse files
committed
Resolve PR comments:
1 parent d704c8e commit 140f201

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

packages/fast-element/src/components/element-controller.pw.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ test.describe("The ElementController", () => {
8787
const element = document.createElement(name);
8888
ElementController.forCustomElement(element);
8989

90-
return element.shadowRoot !== null;
90+
return element.shadowRoot instanceof ShadowRoot;
9191
});
9292

9393
expect(hasShadowRoot).toBe(false);
@@ -117,7 +117,7 @@ test.describe("The ElementController", () => {
117117
const element = document.createElement(name);
118118
ElementController.forCustomElement(element);
119119

120-
return element.shadowRoot !== null;
120+
return element.shadowRoot instanceof ShadowRoot;
121121
});
122122

123123
expect(hasShadowRoot).toBe(false);

packages/fast-element/src/components/hydration.pw.spec.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ test.describe("The HydratableElementController", () => {
2929
element.setAttribute("needs-hydration", "");
3030
ElementController.forCustomElement(element);
3131

32-
const result = element.$fastController instanceof HydratableElementController;
33-
34-
ElementController.setStrategy(ElementController);
35-
return result;
32+
return element.$fastController instanceof HydratableElementController;
3633
});
3734

3835
expect(isHydratableController).toBe(true);

packages/fast-element/src/templating/binding.pw.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3021,9 +3021,7 @@ test.describe("The HTML binding directive", () => {
30213021

30223022
function createClassBinding(element: any) {
30233023
const directive = new HTMLBindingDirective(oneWay(() => ""));
3024-
if (":classList") {
3025-
HTMLDirective.assignAspect(directive, ":classList");
3026-
}
3024+
HTMLDirective.assignAspect(directive, ":classList");
30273025

30283026
directive.id = nextId();
30293027
directive.targetNodeId = "r";

0 commit comments

Comments
 (0)