Skip to content

Commit 79139cd

Browse files
committed
build: rename common tests file
Renames the file with common harness tests not to include `.spec.ts` since it can get picked up as a test by accident.
1 parent a9be1aa commit 79139cd

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/cdk/testing/tests/BUILD.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ng_project(
99
["**/*.ts"],
1010
exclude = [
1111
"**/*.spec.ts",
12+
"cross-environment-tests.ts",
1213
"harnesses/**",
1314
],
1415
),
@@ -30,9 +31,9 @@ ts_project(
3031
)
3132

3233
ts_project(
33-
name = "cross_environment_specs",
34+
name = "cross_environment_tests",
3435
testonly = True,
35-
srcs = ["cross-environment.spec.ts"],
36+
srcs = ["cross-environment-tests.ts"],
3637
deps = [
3738
":test_harnesses",
3839
"//:node_modules/@angular/core",
@@ -48,12 +49,11 @@ ng_project(
4849
"**/*.spec.ts",
4950
],
5051
exclude = [
51-
"cross-environment.spec.ts",
5252
"**/*.e2e.spec.ts",
5353
],
5454
),
5555
deps = [
56-
":cross_environment_specs",
56+
":cross_environment_tests",
5757
":test_components",
5858
":test_harnesses",
5959
"//:node_modules/@angular/core",
@@ -76,7 +76,7 @@ ts_project(
7676
exclude = ["webdriver.e2e.spec.ts"],
7777
),
7878
deps = [
79-
":cross_environment_specs",
79+
":cross_environment_tests",
8080
":test_harnesses",
8181
"//:node_modules/protractor",
8282
"//src/cdk/testing",
@@ -90,7 +90,7 @@ ts_project(
9090
testonly = True,
9191
srcs = ["webdriver.e2e.spec.ts"],
9292
deps = [
93-
":cross_environment_specs",
93+
":cross_environment_tests",
9494
":test_harnesses",
9595
"//:node_modules/@bazel/runfiles",
9696
"//:node_modules/@types/jasmine",
File renamed without changes.

src/cdk/testing/tests/protractor.e2e.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {HarnessLoader} from '../../testing';
22
import {ProtractorHarnessEnvironment} from '../../testing/protractor';
33
import {browser, by, element as protractorElement, ElementFinder} from 'protractor';
44
import {parallel} from '../change-detection';
5-
import {crossEnvironmentSpecs} from './cross-environment.spec';
5+
import {crossEnvironmentSpecs} from './cross-environment-tests';
66
import {MainComponentHarness} from './harnesses/main-component-harness';
77

88
// Kagekiri is available globally in the browser. We declare it here so we can use it in the

src/cdk/testing/tests/test-sub-component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@ang
2121
changeDetection: ChangeDetectionStrategy.OnPush,
2222
})
2323
export class TestSubComponent {
24-
@Input() title: string;
25-
@Input() items: string[];
24+
@Input() title = '';
25+
@Input() items: string[] = [];
2626
}

src/cdk/testing/tests/testbed.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {TestbedHarnessEnvironment} from '../../testing/testbed';
44
import {waitForAsync, ComponentFixture, fakeAsync, TestBed} from '@angular/core/testing';
55
import {provideZoneChangeDetection} from '@angular/core';
66
import {querySelectorAll as piercingQuerySelectorAll} from 'kagekiri';
7-
import {crossEnvironmentSpecs} from './cross-environment.spec';
7+
import {crossEnvironmentSpecs} from './cross-environment-tests';
88
import {FakeOverlayHarness} from './harnesses/fake-overlay-harness';
99
import {MainComponentHarness} from './harnesses/main-component-harness';
1010
import {TestMainComponent} from './test-main-component';

src/cdk/testing/tests/webdriver.e2e.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
waitForAngularReady,
55
} from '../../testing/selenium-webdriver';
66
import * as webdriver from 'selenium-webdriver';
7-
import {crossEnvironmentSpecs} from './cross-environment.spec';
7+
import {crossEnvironmentSpecs} from './cross-environment-tests';
88
import {MainComponentHarness} from './harnesses/main-component-harness';
99
import {Options, setDefaultService, ServiceBuilder} from 'selenium-webdriver/chrome';
1010
import path from 'path';

0 commit comments

Comments
 (0)