From 46b03a524e101c7a7ddf7816e552f2c9061df288 Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 17 Mar 2015 13:51:20 +0100 Subject: [PATCH] feat(test): more tests in Node.js --- gulpfile.js | 10 +++++++++- modules/angular2/src/dom/parse5_adapter.cjs | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index f8dc60a472..8b7d82c07d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -238,9 +238,17 @@ var CONFIG = { test: { js: { cjs: [ + '/angular2/test/change_detection/**/*_spec.js', + '/angular2/test/core/annotations/**/*_spec.js', '/angular2/test/core/compiler/**/*_spec.js', + '/angular2/test/di/**/*_spec.js', '/angular2/test/directives/**/*_spec.js', - '/angular2/test/forms/**/*_spec.js' + '/angular2/test/facade/**/*_spec.js', + '/angular2/test/forms/**/*_spec.js', + '/angular2/test/mock/**/*_spec.js', + '/angular2/test/reflection/**/*_spec.js', + '/angular2/test/services/**/*_spec.js', + '/angular2/test/test_lib/**/*_spec.js' ] } } diff --git a/modules/angular2/src/dom/parse5_adapter.cjs b/modules/angular2/src/dom/parse5_adapter.cjs index 382ef484a2..4f86a7e96a 100644 --- a/modules/angular2/src/dom/parse5_adapter.cjs +++ b/modules/angular2/src/dom/parse5_adapter.cjs @@ -366,10 +366,17 @@ export class Parse5DomAdapter extends DomAdapter { defaultDoc() { if (defDoc === null) { defDoc = StringMapWrapper.create(); + defDoc.title = "Default title"; StringMapWrapper.set(defDoc, "head", treeAdapter.createElement("head", null, [])); } return defDoc; } + getTitle() { + return this.defaultDoc().title || ""; + } + setTitle(newTitle:string) { + this.defaultDoc().title = newTitle; + } isTemplateElement(el:any):boolean { return this.isElementNode(el) && this.tagName(el) === "template"; }