Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/cdk/schematics/BUILD.bazel
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,8 @@ ts_library(
srcs = glob(["**/*.ts"], exclude=[
"**/files/**/*.ts",
"**/*.spec.ts",
"ng-update/test-cases/**/*",
"ng-update/test-cases/**/*.ts",
"testing/**/*.ts"
]),
tsconfig = ":tsconfig.json",
deps = [
Expand All@@ -28,11 +29,8 @@ ts_library(
# TODO(devversion): Only include jasmine for test sources (See: tsconfig types).
"@npm//@types/jasmine",
"@npm//@types/node",
# TODO(devversion): Similarly to "jasmine", we need to extract these into testing only.
"@npm//fs-extra",
"@npm//glob",
"@npm//parse5",
"@npm//rxjs",
"@npm//tslint",
"@npm//typescript"
],
Expand All@@ -58,14 +56,15 @@ ts_library(
name = "schematics_test_sources",
srcs = glob(["**/*.spec.ts"], exclude = ["**/files/**/*.spec.ts"]),
deps = [
":schematics",
"//src/cdk/schematics/testing",
"@npm//@schematics/angular",
"@npm//@angular-devkit/schematics",
"@npm//@types/jasmine",
"@npm//@types/node",
"@npm//mock-fs",
"@npm//tslint",
"@npm//typescript",
":schematics",
],
tsconfig = ":tsconfig.json",
testonly = True,
Expand Down
1 change: 0 additions & 1 deletion src/cdk/schematics/index.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,5 +7,4 @@
*/

export * from './utils';
export * from './testing';
export * from './ng-update/public-api';
18 changes: 18 additions & 0 deletions src/cdk/schematics/testing/BUILD.bazel
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")

ts_library(
name = "testing",
module_name = "@angular/cdk/schematics/testing",
srcs = glob(["**/*.ts"]),
deps = [
"@npm//@angular-devkit/core",
"@npm//@angular-devkit/schematics",
"@npm//@schematics/angular",
"@npm//@types/node",
"@npm//@types/fs-extra",
"@npm//fs-extra",
"@npm//rxjs",
],
)
3 changes: 2 additions & 1 deletion src/cdk/schematics/tsconfig.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,8 @@
"exclude": [
"**/files/**/*",
"**/*.spec.ts",
"ng-update/test-cases/**/*"
"ng-update/test-cases/**/*",
"testing/**/*.ts"
],
"bazelOptions": {
"suppressTsconfigOverrideWarnings": true
Expand Down
1 change: 1 addition & 0 deletions src/lib/schematics/BUILD.bazel
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,6 +53,7 @@ ts_library(
deps = [
":schematics",
"//src/cdk/schematics",
"//src/cdk/schematics/testing",
"@npm//@schematics/angular",
"@npm//@angular-devkit/schematics",
"@npm//@types/jasmine",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/schematics/address-form/index.spec.ts
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {Schema} from './schema';

Expand Down
2 changes: 1 addition & 1 deletion src/lib/schematics/dashboard/index.spec.ts
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {Schema} from './schema';

Expand Down
2 changes: 1 addition & 1 deletion src/lib/schematics/nav/index.spec.ts
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {Schema} from './schema';
import {getFileContent} from '@schematics/angular/utility/test';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';

describe('material-nav-schematic', () => {
let runner: SchematicTestRunner;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/schematics/ng-add/index.spec.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,11 +4,11 @@ import {Tree} from '@angular-devkit/schematics';
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {
addModuleImportToRootModule,
createTestApp,
getProjectFromWorkspace,
getProjectStyleFile,
getProjectTargetOptions,
} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getWorkspace} from '@schematics/angular/utility/config';
import {getFileContent} from '@schematics/angular/utility/test';
import {getIndexHtmlPath} from './fonts/project-index-html';
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import {migrationCollection} from '../index.spec';
import {runTestCases} from '@angular/cdk/schematics';
import {runTestCases} from '@angular/cdk/schematics/testing';

describe('constructor checks', () => {

Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
import {runTestCases} from '@angular/cdk/schematics';
import {runTestCases} from '@angular/cdk/schematics/testing';
import {migrationCollection} from '../index.spec';

describe('v6 import misc checks', () => {
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import {join} from 'path';
import {readFileContent, runTestCases} from '@angular/cdk/schematics';
import {readFileContent, runTestCases} from '@angular/cdk/schematics/testing';
import {migrationCollection} from './index.spec';

describe('v6 upgrade test cases', () => {
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import {join} from 'path';
import {readFileContent, runTestCases} from '@angular/cdk/schematics';
import {readFileContent, runTestCases} from '@angular/cdk/schematics/testing';
import {migrationCollection} from './index.spec';

describe('v7 upgrade test cases', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/schematics/table/index.spec.ts
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {Schema} from './schema';

Expand Down
2 changes: 1 addition & 1 deletion src/lib/schematics/tree/index.spec.ts
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {Schema} from './schema';

Expand Down