(fn)
| 62 | xit("doesn't mutate when in player code", function() { |
| 63 | // We can't run these tests easily because it depends on being in interpreter mode now |
| 64 | const expectNoMutation = function(fn) { |
| 65 | const v = new Vector(5, 5); |
| 66 | const v2 = fn(v); |
| 67 | expect(v.x).toEqual(5); |
| 68 | return expect(v).not.toBe(v2); |
| 69 | }; |
| 70 | |
| 71 | expectNoMutation(v => v.normalize()); |
| 72 | expectNoMutation(v => v.limit(2)); |