MCPcopy Create free account
hub / github.com/codecombat/codecombat / expectNoMutation

Function expectNoMutation

test/app/lib/world/vector.spec.js:64–69  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

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));

Callers 1

vector.spec.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected