Sha256: 3c1c74e785594b9e615577d0cd3e5a853a7c3860aa9c7241ef747ece98baa64b
Contents?: true
Size: 656 Bytes
Versions: 7
Compression:
Stored size: 656 Bytes
Contents
// Copyright 2012 Twitter, Inc // http://www.apache.org/licenses/LICENSE-2.0 var TwitterCldr = require('../../../lib/assets/javascripts/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
7 entries across 7 versions & 1 rubygems