Socialify

Folder ..

Viewing locales.unit.js
19 lines (17 loc) • 574.0 B

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
if (typeof module !== 'undefined') {
  var assert = require('assert');
  var sinon = require('sinon');
  var blaver = require('../index');
}

// TODO: make some tests for getting / setting locales

// Remark: actual use of locales functionality is currently tested in all.functional.js test

describe("locale", function () {
  describe("setLocale()", function () {
    it("setLocale() changes blaver.locale", function () {
      for(var locale in blaver.locales) {
        blaver.setLocale(locale)
        assert.strictEqual(blaver.locale, locale);
      }
    });
  });
});