Sha256: c4841efeefe2bd2d1542b8696ef562780838194dd5412572f491a506ff4074e6

Contents?: true

Size: 787 Bytes

Versions: 4

Compression:

Stored size: 787 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/en.js');

describe("SymbolTable", function() {
  var table;
  beforeEach(function() {
    TwitterCldr.set_data(data);
    table = new TwitterCldr.SymbolTable ({"a":"b", "c":"d"});
  });
  describe("#fetch", function() {
    it("should be able to retrieve values for symbols", function() {
      expect(table.fetch("a")).toEqual("b");
      expect(table.fetch("z")).not.toBeDefined();
    });
    it("should be able to add then fetch new values for symbols", function() {
      table.add("e", "f");
      expect(table.fetch("e")).toEqual("f");
    });
  });
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
twitter_cldr_js-3.3.0 spec/js/parsers/symbol_table.spec.js
twitter_cldr_js-3.2.0 spec/js/parsers/symbol_table.spec.js
twitter_cldr_js-3.1.1 spec/js/parsers/symbol_table.spec.js
twitter_cldr_js-3.1.0 spec/js/parsers/symbol_table.spec.js