From 49537458eaed42512c0145b8c943f1c22932bbf0 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Tue, 27 Nov 2018 12:30:46 -0800 Subject: [PATCH] test(ivy): update //packages/compiler-cli tests for Ivy (#27301) These tests are not relevant to Ivy: //packages/compiler-cli/test/diagnostics:check_types //packages/compiler-cli/test/diagnostics:expression_diagnostics //packages/compiler-cli/test/transformers:test //packages/compiler-cli/test:extract_i18n The //packages/compiler-cli/test:ngtools_api test has 2 specs, one of which passes and the other of which depends on ngtsc supporting lazy routes. It's now disabled with fixmeIvy(). PR Close #27301 --- .../integrationtest/bazel/ng_module/BUILD.bazel | 8 ++++++-- packages/compiler-cli/test/BUILD.bazel | 9 +++++++-- packages/compiler-cli/test/diagnostics/BUILD.bazel | 8 ++++++-- packages/compiler-cli/test/ngtools_api_spec.ts | 3 ++- packages/compiler-cli/test/transformers/BUILD.bazel | 4 +++- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel b/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel index 7edc573095..b65c58d7ce 100644 --- a/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel +++ b/packages/compiler-cli/integrationtest/bazel/ng_module/BUILD.bazel @@ -11,7 +11,9 @@ ng_module( ng_xi18n = "//packages/bazel/src/ngc-wrapped:xi18n", node_modules = "@ngdeps//typescript:typescript__typings", tags = [ - "fixme-ivy-aot", + # Disabled as this test is specific to the flat module indexing of metadata.json files that + # the old ngc compiler does. Ivy has no metadata.json files so this test does not apply. + "no-ivy-aot", ], deps = [ "//packages/core", @@ -34,6 +36,8 @@ jasmine_node_test( srcs = ["spec.js"], data = [":flat_module_index"], tags = [ - "fixme-ivy-aot", + # Disabled as this test is specific to the flat module indexing of metadata.json files that + # the old ngc compiler does. Ivy has no metadata.json files so this test does not apply. + "no-ivy-aot", ], ) diff --git a/packages/compiler-cli/test/BUILD.bazel b/packages/compiler-cli/test/BUILD.bazel index 86228d25ea..e31da05531 100644 --- a/packages/compiler-cli/test/BUILD.bazel +++ b/packages/compiler-cli/test/BUILD.bazel @@ -43,7 +43,9 @@ jasmine_node_test( "//packages/core:npm_package", ], tags = [ - "fixme-ivy-aot", + # Disabled as the tests pertain to the old extraction tool only, whereas the Ivy extraction + # tool will likely work differently. + "no-ivy-aot", ], deps = [ ":extract_i18n_lib", @@ -80,7 +82,9 @@ jasmine_node_test( "//packages/router:npm_package", ], tags = [ - "fixme-ivy-aot", + # Disabled as these tests are specific to the old ngc compiler, and not ngtsc which has its + # own tests under //packages/compiler-cli/test/ngtsc. + "no-ivy-aot", ], deps = [ ":ngc_lib", @@ -102,6 +106,7 @@ ts_library( ":test_utils", "//packages/compiler", "//packages/compiler-cli", + "//packages/private/testing", "@ngdeps//typescript", ], ) diff --git a/packages/compiler-cli/test/diagnostics/BUILD.bazel b/packages/compiler-cli/test/diagnostics/BUILD.bazel index e86f7244d4..19eb83b305 100644 --- a/packages/compiler-cli/test/diagnostics/BUILD.bazel +++ b/packages/compiler-cli/test/diagnostics/BUILD.bazel @@ -38,7 +38,9 @@ jasmine_node_test( "//packages/core:npm_package", ], tags = [ - "fixme-ivy-aot", + # Disabled as these tests pertain to typechecking in the old ngc compiler. The Ivy ngtsc + # compiler has its own typechecking implementation and tests. + "no-ivy-aot", ], deps = [ ":check_types_lib", @@ -71,7 +73,9 @@ jasmine_node_test( "//packages/forms:npm_package", ], tags = [ - "fixme-ivy-aot", + # Disabled as these tests pertain to diagnostics in the old ngc compiler. The Ivy ngtsc + # compiler has its own tests for diagnostics. + "no-ivy-aot", ], deps = [ ":expression_diagnostics_lib", diff --git a/packages/compiler-cli/test/ngtools_api_spec.ts b/packages/compiler-cli/test/ngtools_api_spec.ts index bab6213015..e0424bd3a9 100644 --- a/packages/compiler-cli/test/ngtools_api_spec.ts +++ b/packages/compiler-cli/test/ngtools_api_spec.ts @@ -7,6 +7,7 @@ */ import {__NGTOOLS_PRIVATE_API_2 as NgTools_InternalApi_NG_2} from '@angular/compiler-cli'; +import {fixmeIvy} from '@angular/private/testing'; import * as path from 'path'; import * as ts from 'typescript'; @@ -59,7 +60,7 @@ describe('ngtools_api (deprecated)', () => { }); } - it('should list lazy routes recursively', () => { + fixmeIvy('FW-629: ngtsc lists lazy routes') && it('should list lazy routes recursively', () => { writeSomeRoutes(); const {program, host, options} = createProgram(['src/main.ts']); const routes = NgTools_InternalApi_NG_2.listLazyRoutes({ diff --git a/packages/compiler-cli/test/transformers/BUILD.bazel b/packages/compiler-cli/test/transformers/BUILD.bazel index 6b1ef1a999..b4435f7c59 100644 --- a/packages/compiler-cli/test/transformers/BUILD.bazel +++ b/packages/compiler-cli/test/transformers/BUILD.bazel @@ -26,7 +26,9 @@ jasmine_node_test( "//packages/router:npm_package", ], tags = [ - "fixme-ivy-aot", + # Disabled as these tests pertain to the old compiler and not ngtsc, which doesn't use any + # of these transformer utilities. + "no-ivy-aot", ], deps = [ ":test_lib",