refactor(tests): exctract createElement into a helper

This commit is contained in:
vsavkin
2015-01-08 09:11:33 -08:00
parent c5b0baf805
commit bf609f0e56
20 changed files with 206 additions and 268 deletions
+5
View File
@@ -6,6 +6,7 @@ import 'package:unittest/unittest.dart' hide expect;
import 'dart:mirrors';
import 'dart:async';
import 'package:reflection/reflection.dart';
import 'package:facade/dom.dart';
import 'package:reflection/reflection_capabilities.dart';
bool IS_DARTIUM = true;
@@ -67,4 +68,8 @@ _handleAsync(fn) {
}
return fn;
}
el(String html) {
return DOM.createTemplate(html).content.firstChild;
}
+7
View File
@@ -1,3 +1,5 @@
import {DOM} from 'facade/dom';
export var describe = window.describe;
export var xdescribe = window.xdescribe;
export var ddescribe = window.ddescribe;
@@ -127,4 +129,9 @@ function mapToString(m) {
res.push(`${k}:${v}`);
});
return `{ ${res.join(',')} }`;
}
export function el(html) {
return DOM.createTemplate(html).content.firstChild;
}