feat(test): more tests in Node.js

This commit is contained in:
Marc Laval 2015-03-17 13:51:20 +01:00 committed by vsavkin
parent 99f2d7faf6
commit 46b03a524e
2 changed files with 16 additions and 1 deletions

View File

@ -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'
]
}
}

View File

@ -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";
}