You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
trying to remove multiple lines fail with version 0.4.1
Her is the fix, line 1243 of miso.ds.0.4.1.m.js
_.each(rowsToRemove, function(rowId) {
is rewritten
_.each(rowsToRemove.reverse(), function(rowId) {
That's a classic one, nope?
Want a jasmine test?? see below, the two last tests are failing by removing the wrong line...
Thanks a lot for for the Miso works ;)
define(['underscore', 'Miso'], function(_, Miso) {
describe('Miso.Dataset', function() {
//just make a array of element with incremental id fireld and one char at a time
var buildDummy = function(chars) {
return _.map(chars.split(''), function(c, i) {
return {
idx : i,
val : c
}
})
}
// load a dummy dataset and exeut the callback test when fetched
var checkWithDummyDS = function(testName, chars, testCallback) {
it(testName, function() {
var ds = new Miso.Dataset({
data : buildDummy(chars)
});
var ok;
ds.fetch({
success : function() {
ok = true
},
error : function(err) {
throw err
}
})
waitsFor(function() {
return ok
})
runs(function() {
testCallback(ds)
})
})
}
it('builDummy', function() {
expect(buildDummy('acc')).toEqual([{
idx : 0,
val : 'a'
}, {
idx : 1,
val : 'c'
}, {
idx : 2,
val : 'c'
}]);
Hi
trying to remove multiple lines fail with version 0.4.1
Her is the fix, line 1243 of miso.ds.0.4.1.m.js
_.each(rowsToRemove, function(rowId) {
is rewritten
_.each(rowsToRemove.reverse(), function(rowId) {
That's a classic one, nope?
Want a jasmine test?? see below, the two last tests are failing by removing the wrong line...
Thanks a lot for for the Miso works ;)
define(['underscore', 'Miso'], function(_, Miso) {
describe('Miso.Dataset', function() {
//just make a array of element with incremental id fireld and one char at a time
var buildDummy = function(chars) {
return _.map(chars.split(''), function(c, i) {
return {
idx : i,
val : c
}
})
}
// load a dummy dataset and exeut the callback test when fetched
var checkWithDummyDS = function(testName, chars, testCallback) {
it(testName, function() {
var ds = new Miso.Dataset({
data : buildDummy(chars)
});
var ok;
ds.fetch({
success : function() {
ok = true
},
error : function(err) {
throw err
}
})
waitsFor(function() {
return ok
})
runs(function() {
testCallback(ds)
})
})
}
it('builDummy', function() {
expect(buildDummy('acc')).toEqual([{
idx : 0,
val : 'a'
}, {
idx : 1,
val : 'c'
}, {
idx : 2,
val : 'c'
}]);
})
The text was updated successfully, but these errors were encountered: