Permalink
Browse files

Use a better util function in the templating tests

  • Loading branch information...
1 parent ed307bc commit a6a411d212ed7fb145f554143c046c6e6a1a3142 Sean McBride committed with mbest Aug 25, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 spec/templatingBehaviors.js
@@ -77,8 +77,7 @@ var dummyTemplateEngine = function (templates) {
node.removeChild(node.lastChild);
// Convert the nodelist to an array to mimic what the default templating engine does, so we see the effects of not being able to remove dead memo comment nodes.
- var renderedNodesArray=[];
- for(var i=0, n; n = node.childNodes[i]; i++) renderedNodesArray.push(n);
+ var renderedNodesArray = ko.utils.makeArray(node.childNodes);
return renderedNodesArray;
}

0 comments on commit a6a411d

Please sign in to comment.