Sha256: 86eea804211e9ccede21cff7da88847bfd50da0eccef3ecf847ad74d1595974d
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
// Copyright 2012 Twitter, Inc // http://www.apache.org/licenses/LICENSE-2.0 //= require '../../../build/twitter_cldr_en.js' describe("PercentFormatter", function() { beforeEach(function() { formatter = new TwitterCldr.PercentFormatter(); }); it("should format the number correctly", function() { expect(formatter.format(12)).toEqual("12%"); }); it("should format negative numbers correctly", function() { expect(formatter.format(-12)).toEqual("-12%"); }); 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/percent_spec.js |
twitter_cldr-1.7.0 | js/spec/js/numbers/percent_spec.js |