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

Function expectMutation

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

Source from the content-addressed store, hash-verified

79
80 return it('mutates when not in player code', function() {
81 const expectMutation = function(fn) {
82 const v = new Vector(5, 5);
83 const v2 = fn(v);
84 expect(v.x).not.toEqual(5);
85 return expect(v).toBe(v2);
86 };
87
88 expectMutation(v => v.normalize());
89 expectMutation(v => v.limit(2));

Callers 1

vector.spec.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected