This issue was found while performing mutation analysis on the the test suite vector-test.js.
Even though vector.js' moveTo() appears to be applicative and it should save the changes to the caller object (via "this.x", et cetera), the changes do not seem to persist as the following (new) test shows:
describe('One vector: ', function () {
it('is moved to another position', function () { // is converted into another?
var x = new v(1,0,0);
var y = new v(1,1,0);
var c = x.distanceFrom(y);
c.should.eql(1);
x.moveTo(y);
var c = x.distanceFrom(y);
c.should.eql(0); // <--- fails here because x.distanceFrom(y) returns 1 (one).
})
});
This issue was found while performing mutation analysis on the the test suite vector-test.js.
Even though vector.js' moveTo() appears to be applicative and it should save the changes to the caller object (via "this.x", et cetera), the changes do not seem to persist as the following (new) test shows: