Skip to content

Commit

Permalink
fixed stress test
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpvar committed Feb 26, 2011
1 parent 71faca0 commit 3a3468a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 3 additions & 0 deletions test/files/test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="test">
<span class="name"></span> : <span class="data"></span>
</div>
13 changes: 5 additions & 8 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ module.exports = {
'email' : 'tmpvar@gmail.com'
};

$('form').weld(data);
window.weld($('form')[0], data);

test.ok($(':input[name=email]').val() === data.email);
test.done();
Expand All @@ -307,7 +307,7 @@ module.exports = {

var $ = window.jQuery;

$('.list .item').weld([
window.weld($('.list .item')[0], [
{ where : 'world' }
], {
map : function(element, k, v) {
Expand All @@ -325,12 +325,9 @@ module.exports = {
var fs = require('fs');
var jsdom = require('jsdom');

var html = fs.readFileSync(__dirname + "/test.html", 'utf8');
var html = fs.readFileSync(__dirname + "/files/test.html", 'utf8');
for (var i = 0; i < 1000; i++) {
jsdom.env(html, [
__dirname + '/jquery.js',
__dirname + '/weld.js'
],
jsdom.env(html, [jqpath, wpath],
function(error, window) {
var $ = window.jQuery;

Expand All @@ -339,7 +336,7 @@ module.exports = {
"data": "hello"
};

$("#test").weld(data);
window.weld($("#test")[0], data);
console.log($("#test").html());
});
}
Expand Down

0 comments on commit 3a3468a

Please sign in to comment.