Tests: enable the three kind of components in all related files but api/tests/test-route.js

This commit is contained in:
Pierre-Yves Gerardy 2017-02-19 02:10:22 +01:00
parent 24243dba94
commit fca89f987f
7 changed files with 8 additions and 28 deletions

View file

@ -33,7 +33,7 @@ o.spec("mount", function() {
o(threw).equals(true)
})
;[components[0]].forEach(function(cmp){
components.forEach(function(cmp){
o.spec(cmp.kind, function(){
var createComponent = cmp.create
@ -47,7 +47,7 @@ o.spec("mount", function() {
o(threw).equals(true)
})
o("renders into `root` (POJO component)", function() {
o("renders into `root`", function() {
mount(root, createComponent({
view : function() {
return m("div")
@ -57,26 +57,6 @@ o.spec("mount", function() {
o(root.firstChild.nodeName).equals("DIV")
})
o("renders into `root` (class component)", function() {
function Cmp(){}
Cmp.prototype.view = function(){return m("div")}
mount(root, Cmp)
o(root.firstChild.nodeName).equals("DIV")
})
o("renders into `root` (closure component)", function() {
mount(root, function(){
return {
view : function() {
return m("div")
}
}
})
o(root.firstChild.nodeName).equals("DIV")
})
o("mounting null unmounts", function() {
mount(root, createComponent({
view : function() {