Sha256: 92a0f0868110837749942fd1991b6d6c9cb330c9f62a7b3697f648fd7595f292

Contents?: true

Size: 855 Bytes

Versions: 4

Compression:

Stored size: 855 Bytes

Contents

// Copyright 2012 Twitter, Inc
// http://www.apache.org/licenses/LICENSE-2.0

var TwitterCldr = require('../../../lib/assets/javascripts/twitter_cldr/core.js');
var data = require('../../../lib/assets/javascripts/twitter_cldr/ru.js');

describe("TimespanFormatter", function() {
  var formatter;
  beforeEach(function() {
    TwitterCldr.set_data(data);
    formatter = new TwitterCldr.TimespanFormatter();
  });
  describe("#format", function() {
    it("works for Russian", function() {
      var options = {direction: "none", approximate: true};
      expect(formatter.format(1, options)).toEqual("1 секунда");
      expect(formatter.format(2, options)).toEqual("2 секунды");
      expect(formatter.format(5, options)).toEqual("5 секунд");
      expect(formatter.format(23, options)).toEqual("23 секунды");
    });
  });
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twitter_cldr_js-3.3.0 spec/js/calendars/timespan.ru.spec.js
twitter_cldr_js-3.2.0 spec/js/calendars/timespan.ru.spec.js
twitter_cldr_js-3.1.1 spec/js/calendars/timespan.ru.spec.js
twitter_cldr_js-3.1.0 spec/js/calendars/timespan.ru.spec.js