Sha256: 7fc03f6182ac985ee75976ad09a057f7f690e3eba19ba353c30e0c38cb031926

Contents?: true

Size: 254 Bytes

Versions: 49

Compression:

Stored size: 254 Bytes

Contents

//= require array_sum

describe("Array#sum (js)", function(){
  it("returns 0 when the Array is empty", function(){
    [].sum().should.equal(0);
  });

  it("returns the sum of numeric elements", function(){
    [1,2,3].sum().should.equal(6);
  });
});

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
konacha-4.0.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.7.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.6.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.5.1 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.5.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.4.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.3.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.2.5 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.2.4 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.2.3 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.2.2 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.2.1 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.2.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.1.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-3.0.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-2.7.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-2.6.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-2.5.1 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-2.5.0 spec/dummy/spec/javascripts/array_sum_js_spec.js
konacha-2.4.0 spec/dummy/spec/javascripts/array_sum_js_spec.js