diff options
| author | Ivan Goncharov <[email protected]> | 2017-09-08 22:49:06 +0300 |
|---|---|---|
| committer | Ivan Goncharov <[email protected]> | 2017-09-08 22:49:06 +0300 |
| commit | 54aab215ae65cbfe371b40f87c7b877ed93a4e2c (patch) | |
| tree | 8f59a34766b78219cbda95e9e086018fb6b0c603 /test | |
| parent | aa8ac6cc11bb1be49dfd184289d45c8d9f420734 (diff) | |
| download | faker-54aab215ae65cbfe371b40f87c7b877ed93a4e2c.tar.xz faker-54aab215ae65cbfe371b40f87c7b877ed93a4e2c.zip | |
Add test for setLocale function added in #488
Diffstat (limited to 'test')
| -rw-r--r-- | test/locales.unit.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/locales.unit.js b/test/locales.unit.js index 0b2d4175..932369f4 100644 --- a/test/locales.unit.js +++ b/test/locales.unit.js @@ -6,4 +6,15 @@ if (typeof module !== 'undefined') { // TODO: make some tests for getting / setting locales -// Remark: actual use of locales functionality is currently tested in all.functional.js test
\ No newline at end of file +// Remark: actual use of locales functionality is currently tested in all.functional.js test + +describe("locale", function () { + describe("setLocale()", function () { + it("setLocale() changes faker.locale", function () { + for(var locale in faker.locales) { + faker.setLocale(locale) + assert.equal(faker.locale, locale); + } + }); + }); +}); |
