From 54aab215ae65cbfe371b40f87c7b877ed93a4e2c Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Fri, 8 Sep 2017 22:49:06 +0300 Subject: Add test for setLocale function added in #488 --- test/locales.unit.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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); + } + }); + }); +}); -- cgit v1.2.3