From c400fa2fa9ffe80cdb4476c8a004694dfd0a9969 Mon Sep 17 00:00:00 2001 From: Brian Nenninger Date: Fri, 17 Jun 2016 14:28:50 -0400 Subject: [PATCH] Make sure div is always removed after tests. (#705) --- src/core/overlay/position/viewport-ruler.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/overlay/position/viewport-ruler.spec.ts b/src/core/overlay/position/viewport-ruler.spec.ts index de1702f5ec7..f9ac8d9bce1 100644 --- a/src/core/overlay/position/viewport-ruler.spec.ts +++ b/src/core/overlay/position/viewport-ruler.spec.ts @@ -46,6 +46,7 @@ describe('ViewportRuler', () => { // successfully constrain its size. As such, skip assertions in environments where the // window size has changed since the start of the test. if (window.innerWidth > startingWindowWidth || window.innerHeight > startingWindowHeight) { + document.body.removeChild(veryLargeElement); return; } @@ -78,6 +79,7 @@ describe('ViewportRuler', () => { // successfully constrain its size. As such, skip assertions in environments where the // window size has changed since the start of the test. if (window.innerWidth > startingWindowWidth || window.innerHeight > startingWindowHeight) { + document.body.removeChild(veryLargeElement); return; }