Sha256: b99bbe53e5469093faa15aff1304268713fe19e626d02db0c3a197a854118e3a
Contents?: true
Size: 695 Bytes
Versions: 2
Compression:
Stored size: 695 Bytes
Contents
// Copyright 2012 Twitter, Inc // http://www.apache.org/licenses/LICENSE-2.0 //= require '../../../build/twitter_cldr_en.js' describe("DecimalFormatter", function() { beforeEach(function() { formatter = new TwitterCldr.DecimalFormatter(); }); describe("#format", function() { it("should format positive decimals correctly", function() { expect(formatter.format(12.1)).toEqual("12.1"); }); it("should format negative decimals correctly", function() { expect(formatter.format(-12.1)).toEqual("-12.1"); }); it("should respect the precision option", function() { expect(formatter.format(-12, {precision: 3})).toEqual("-12.000"); }); }); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twitter_cldr-1.8.0 | js/spec/js/numbers/decimal_spec.js |
twitter_cldr-1.7.0 | js/spec/js/numbers/decimal_spec.js |