Skip to content

Commit 8e54b57

Browse files
devversionthePunderWoman
authored andcommitted
build: move private testing helpers outside platform-browser/testing (#61571)
These helpers are often imported by various tests throughout the repository, but the helpers aren't exported/exposed from the public entry-point; even though they confusingly reside in there. This commit fixes this, and moves the helpers into `packages/private/testing`. This is a preparation for the `ts_project` migration where we don't want to leverage deep imports between packages. PR Close #61571
1 parent 21e5f07 commit 8e54b57

File tree

73 files changed

+116
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+116
-72
lines changed

packages/animations/browser/src/private_export.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ export {
3232
camelCaseToDashCase as ɵcamelCaseToDashCase,
3333
normalizeKeyframes as ɵnormalizeKeyframes,
3434
} from './util';
35+
export {TransitionAnimationPlayer as ɵTransitionAnimationPlayer} from './render/transition_animation_engine';
36+
export {ENTER_CLASSNAME as ɵENTER_CLASSNAME, LEAVE_CLASSNAME as ɵLEAVE_CLASSNAME} from './util';

packages/animations/browser/test/BUILD.bazel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ ts_project(
55
name = "test_lib",
66
testonly = True,
77
srcs = glob(["**/*.ts"]),
8+
interop_deps = [
9+
"//packages/private/testing",
10+
],
811
deps = [
9-
"//packages:types_rjs",
1012
"//packages/animations:animations_rjs",
1113
"//packages/animations/browser:browser_rjs",
1214
"//packages/animations/browser/testing:testing_rjs",

packages/animations/browser/test/dsl/animation_spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.dev/license
77
*/
8+
9+
import {isNode} from '@angular/private/testing';
10+
811
import {
912
animate,
1013
animation,

packages/animations/browser/test/dsl/animation_trigger_spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9+
import {isNode} from '@angular/private/testing';
10+
911
import {animate, AnimationOptions, state, style, transition} from '../../../src/animations';
1012
import {AnimationTransitionInstruction} from '../../src/dsl/animation_transition_instruction';
1113
import {AnimationTrigger} from '../../src/dsl/animation_trigger';

packages/animations/browser/test/render/timeline_animation_engine_spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.dev/license
77
*/
8+
9+
import {isNode} from '@angular/private/testing';
10+
811
import {animate, AnimationMetadata, style} from '../../../src/animations';
912

1013
import {

packages/animations/browser/test/render/transition_animation_engine_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
AnimationEvent,
1111
AnimationMetadata,
1212
AnimationTriggerMetadata,
13-
NoopAnimationPlayer,
1413
state,
1514
style,
1615
transition,
@@ -30,6 +29,7 @@ import {
3029
TransitionAnimationPlayer,
3130
} from '../../src/render/transition_animation_engine';
3231
import {MockAnimationDriver, MockAnimationPlayer} from '../../testing/src/mock_animation_driver';
32+
import {isNode} from '@angular/private/testing';
3333

3434
const DEFAULT_NAMESPACE_ID = 'id';
3535

packages/animations/browser/test/render/web_animations/web_animations_driver_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.dev/license
77
*/
8+
import {isNode} from '@angular/private/testing';
89
import {WebAnimationsDriver} from '../../../src/render/web_animations/web_animations_driver';
910
import {WebAnimationsPlayer} from '../../../src/render/web_animations/web_animations_player';
1011

packages/animations/test/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ts_project(
1212
"//packages/platform-browser/animations",
1313
"//packages/platform-browser/animations/async",
1414
"//packages/platform-browser/testing",
15+
"//packages/private/testing",
1516
],
1617
deps = [
1718
"//packages:types_rjs",

packages/animations/test/browser_animation_builder_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {ɵDomRendererFactory2 as DomRendererFactory2} from '@angular/platform-br
2020
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
2121
import {ɵAsyncAnimationRendererFactory as AsyncAnimationRendererFactory} from '@angular/platform-browser/animations/async';
2222
import {BrowserTestingModule, platformBrowserTesting} from '@angular/platform-browser/testing';
23+
import {isNode} from '@angular/private/testing';
2324

2425
describe('BrowserAnimationBuilder', () => {
2526
if (isNode) {

packages/common/http/test/resource_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9+
import {isNode} from '@angular/private/testing';
910
import {ApplicationRef, Injector, signal} from '@angular/core';
1011
import {TestBed} from '@angular/core/testing';
1112
import {

0 commit comments

Comments
 (0)