Improve unit-tests (#1946)

* Improved unit-tests speed & reliability

* Fixed iOS tests.
Improved message output
This commit is contained in:
Hristo Hristov
2016-04-13 10:28:28 +03:00
parent 3ca4e34d3b
commit a66636fc6b
29 changed files with 1083 additions and 1596 deletions

View File

@@ -69,14 +69,14 @@ export class StyleScope {
}
private setCss(cssString: string, cssFileName?: string, append: boolean = false): void {
this._css = this._css ? this._css + cssString : cssString;
this._css = this._css && append ? this._css + cssString : cssString;
if (cssFileName) {
this._cssFileName = cssFileName;
}
this._reset();
const parsedSelectors = StyleScope.createSelectorsFromCss(cssString, cssFileName, this._keyframes);
const parsedSelectors = StyleScope.createSelectorsFromCss(this._css, cssFileName, this._keyframes);
if (append) {
this._localCssSelectors.push.apply(this._localCssSelectors, parsedSelectors);
} else {