Tests: enable the three kind of components in all related files but api/tests/test-route.js
This commit is contained in:
parent
24243dba94
commit
fca89f987f
7 changed files with 8 additions and 28 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue