test(animations): fix Node.js detection in animation tests (#24139)

PR Close #24139
This commit is contained in:
Vikram Subramanian
2018-05-25 13:52:58 -07:00
committed by Matias Niemelä
parent 1eafd04eb3
commit 3fd3c2ac4c
14 changed files with 14 additions and 18 deletions

View File

@ -20,7 +20,7 @@ const DEFAULT_COMPONENT_ID = '1';
(function() {
// these tests are only mean't to be run within the DOM (for now)
if (typeof Element == 'undefined') return;
if (isNode) return;
describe('animation tests', function() {
function getLog(): MockAnimationPlayer[] {

View File

@ -21,7 +21,7 @@ import {fakeAsync, flushMicrotasks} from '../../testing/src/fake_async';
(function() {
// these tests are only mean't to be run within the DOM (for now)
if (typeof Element == 'undefined') return;
if (isNode) return;
describe('animation query tests', function() {
function getLog(): MockAnimationPlayer[] {

View File

@ -16,7 +16,7 @@ import {RouterTestingModule} from '@angular/router/testing';
(function() {
// these tests are only mean't to be run within the DOM (for now)
if (typeof Element == 'undefined') return;
if (isNode) return;
describe('Animation Router Tests', function() {
function getLog(): MockAnimationPlayer[] {

View File

@ -17,7 +17,7 @@ import {TestBed} from '../../testing';
(function() {
// these tests are only mean't to be run within the DOM (for now)
// Buggy in Chromium 39, see https://github.com/angular/angular/issues/15793
if (typeof Element == 'undefined') return;
if (isNode) return;
describe('animation integration tests using css keyframe animations', function() {

View File

@ -18,7 +18,7 @@ import {TestBed} from '../../testing';
(function() {
// these tests are only mean't to be run within the DOM (for now)
// Buggy in Chromium 39, see https://github.com/angular/angular/issues/15793
if (typeof Element == 'undefined' || !ɵsupportsWebAnimations()) return;
if (isNode || !ɵsupportsWebAnimations()) return;
describe('animation integration tests using web animations', function() {