aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKarl Hughes <[email protected]>2018-01-20 11:23:02 -0600
committerKarl Hughes <[email protected]>2018-01-20 11:23:02 -0600
commitfd6df80f2e3b7a3d985dcdac9593cca23af06cf3 (patch)
tree8913c382904f8969ef9d8c737e1c0037d223ebb2 /test
parent220e5cbff3ac8bd437619c5df712bbfb8622895d (diff)
downloadfaker-fd6df80f2e3b7a3d985dcdac9593cca23af06cf3.tar.xz
faker-fd6df80f2e3b7a3d985dcdac9593cca23af06cf3.zip
Adding test for zipcode by state, basic functionality
Diffstat (limited to 'test')
-rw-r--r--test/address.unit.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/address.unit.js b/test/address.unit.js
index 28775850..a7bd2e1a 100644
--- a/test/address.unit.js
+++ b/test/address.unit.js
@@ -252,6 +252,22 @@ describe("address.js", function () {
});
});
+ describe.only("zipCodeByState()", function () {
+ it("returns zipCode valid for specified State", function () {
+ faker.locale = "en_US";
+ var state = "IL";
+ var zipCode = faker.address.zipCodeByState(state);
+
+ assert.ok(zipCode >= 60000);
+ assert.ok(zipCode <= 60099);
+ });
+
+ it("throws error if locale is invalid", function () {
+ });
+ it("throws error if state is invalid", function () {
+ });
+ });
+
describe("latitude()", function () {
it("returns random latitude", function () {
for (var i = 0; i < 100; i++) {