test(animations): fix Node.js detection in animation tests (#24139)
PR Close #24139
This commit is contained in:

committed by
Matias Niemelä

parent
1eafd04eb3
commit
3fd3c2ac4c
@ -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[] {
|
||||
|
@ -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[] {
|
||||
|
@ -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[] {
|
||||
|
@ -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() {
|
||||
|
||||
|
@ -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() {
|
||||
|
||||
|
Reference in New Issue
Block a user