test: fix ivy ts_devserver tests under /packages/core/test/bunding/ (#32520)

PR Close #32520
This commit is contained in:
Greg Magolan 2019-09-06 16:01:18 -07:00 committed by Matias Niemelä
parent 33038f6ebe
commit df5924abd0
7 changed files with 22 additions and 48 deletions

View File

@ -89,8 +89,13 @@ genrule(
ts_devserver( ts_devserver(
name = "devserver", name = "devserver",
entry_module = "angular/packages/core/test/bundling/todo/index", entry_module = "@angular/core/test/bundling/todo",
serving_path = "/bundle.min.js", scripts = [
"//tools/rxjs:rxjs_umd_modules",
],
# Use a serving_path that matches the common static index.html used
# in both devserver & prodserver
serving_path = "/bundle.min.js.br",
static_files = [ static_files = [
"index.html", "index.html",
":tslib", ":tslib",

View File

@ -38,20 +38,6 @@
(document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') + (document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') +
'"></' + 'script>'); '"></' + 'script>');
</script> </script>
<script>
if (typeof define === "function" && define.amd) {
// If `define` is defined that we are in devserver mode. Dev server concatenates all of the
// source files and than loads them using `require`. There is an issue with the way
// `@angular/core` imports are generated which results in both `@angular/core` as well as `@angular/core/index`
// This hack makes both of the exports available to the application.
define("@angular/core", ["require", "exports", "tslib", "@angular/core/index"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib = require("tslib");
tslib.__exportStar(require("@angular/core/index"), exports);
});
}
</script>
</body> </body>
</html> </html>

View File

@ -83,8 +83,13 @@ genrule(
ts_devserver( ts_devserver(
name = "devserver", name = "devserver",
entry_module = "angular/packages/core/test/bundling/todo_i18n/index", entry_module = "@angular/core/test/bundling/todo_i18n",
serving_path = "/bundle.min.js", scripts = [
"//tools/rxjs:rxjs_umd_modules",
],
# Use a serving_path that matches the common static index.html used
# in both devserver & prodserver
serving_path = "/bundle.min.js.br",
static_files = [ static_files = [
"index.html", "index.html",
":tslib", ":tslib",

View File

@ -38,20 +38,6 @@
(document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') + (document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') +
'"></' + 'script>'); '"></' + 'script>');
</script> </script>
<script>
if (typeof define === "function" && define.amd) {
// If `define` is defined that we are in devserver mode. Dev server concatenates all of the
// source files and than loads them using `require`. There is an issue with the way
// `@angular/core` imports are generated which results in both `@angular/core` as well as `@angular/core/index`
// This hack makes both of the exports available to the application.
define("@angular/core", ["require", "exports", "tslib", "@angular/core/index"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib = require("tslib");
tslib.__exportStar(require("@angular/core/index"), exports);
});
}
</script>
</body> </body>
</html> </html>

View File

@ -84,8 +84,13 @@ genrule(
ts_devserver( ts_devserver(
name = "devserver", name = "devserver",
entry_module = "angular/packages/core/test/bundling/todo_r2/index", entry_module = "@angular/core/test/bundling/todo_r2",
serving_path = "/bundle.min.js", scripts = [
"//tools/rxjs:rxjs_umd_modules",
],
# Use a serving_path that matches the common static index.html used
# in both devserver & prodserver
serving_path = "/bundle.min.js.br",
static_files = [ static_files = [
"index.html", "index.html",
":tslib", ":tslib",

View File

@ -38,20 +38,6 @@
(document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') + (document.location.search.endsWith('debug') ? '/bundle.min_debug.js' : '/bundle.min.js.br') +
'"></' + 'script>'); '"></' + 'script>');
</script> </script>
<script>
if (typeof define === "function" && define.amd) {
// If `define` is defined that we are in devserver mode. Dev server concatenates all of the
// source files and than loads them using `require`. There is an issue with the way
// `@angular/core` imports are generated which results in both `@angular/core` as well as `@angular/core/index`
// This hack makes both of the exports available to the application.
define("@angular/core", ["require", "exports", "tslib", "@angular/core/index"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib = require("tslib");
tslib.__exportStar(require("@angular/core/index"), exports);
});
}
</script>
</body> </body>
</html> </html>

View File

@ -12,6 +12,7 @@ ts_library(
":metadata_switch", ":metadata_switch",
], ],
module_name = "@angular/core/test/bundling/util/src/reflect_metadata", module_name = "@angular/core/test/bundling/util/src/reflect_metadata",
module_root = "src/reflect_metadata",
deps = ["@npm//reflect-metadata"], deps = ["@npm//reflect-metadata"],
) )