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() {

View file

@ -14,7 +14,7 @@ o.spec("component", function() {
render = vdom($window).render
})
;[components[0]].forEach(function(cmp){
components.forEach(function(cmp){
o.spec(cmp.kind, function(){
var createComponent = cmp.create

View file

@ -170,7 +170,7 @@ o.spec("onbeforeremove", function() {
done()
})
})
;[components[0]].forEach(function(cmp){
components.forEach(function(cmp){
o.spec(cmp.kind, function(){
var createComponent = cmp.create
o("finalizes the remove phase asynchronously when promise is returned synchronously from both attrs- and tag.onbeforeremove", function(done) {

View file

@ -120,7 +120,7 @@ o.spec("onbeforeupdate", function() {
o(count).equals(1)
})
;[components[0]].forEach(function(cmp){
components.forEach(function(cmp){
o.spec(cmp.kind, function(){
var createComponent = cmp.create

View file

@ -113,7 +113,7 @@ o.spec("onremove", function() {
o(vnode.dom).notEquals(updated.dom)
})
;[components[0]].forEach(function(cmp){
components.forEach(function(cmp){
o.spec(cmp.kind, function(){
var createComponent = cmp.create

View file

@ -905,7 +905,7 @@ o.spec("updateNodes", function() {
o(vnode.dom).notEquals(updated.dom)
})
;[components[0]].forEach(function(cmp){
components.forEach(function(cmp){
o.spec(cmp.kind, function(){
var createComponent = cmp.create

View file

@ -88,7 +88,7 @@ o.spec("api", function() {
o(root.firstChild.nodeName).equals("DIV")
})
})
;[components[0]].forEach(function(cmp){
components.forEach(function(cmp){
o.spec(cmp.kind, function(){
var createComponent = cmp.create