aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarak <[email protected]>2018-09-24 10:54:48 -0400
committerMarak <[email protected]>2018-09-24 10:55:08 -0400
commit4759e2b35c0557fbc17ed38dc5cbc21929de29bc (patch)
tree077dea345934ffb7c8f3fe3dc6ffded40115d96a /test
parentafb8a7f2ac662ce742e18668d6537f0d42cba6e2 (diff)
downloadfaker-4759e2b35c0557fbc17ed38dc5cbc21929de29bc.tar.xz
faker-4759e2b35c0557fbc17ed38dc5cbc21929de29bc.zip
[api] [fix] [refactor] Unique options into class
* #466 #596 * Fixes scope issues with max values
Diffstat (limited to 'test')
-rw-r--r--test/unique.unit.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unique.unit.js b/test/unique.unit.js
index 4edb8220..47b38d9d 100644
--- a/test/unique.unit.js
+++ b/test/unique.unit.js
@@ -8,8 +8,8 @@ describe("unique.js", function () {
describe("unique()", function () {
it("is able to call a function with no arguments and return a result", function () {
- var result = faker.unique(faker.internet.email);
- assert.equal(typeof result, 'string');
+ var result = faker.unique(faker.internet.email);
+ assert.equal(typeof result, 'string');
});
it("is able to call a function with arguments and return a result", function () {
@@ -17,7 +17,7 @@ describe("unique.js", function () {
assert.ok(result.match(/\@c/));
});
- it("is able to call a function with arguments and return a result", function () {
+ it("is able to call same function with arguments and return a result", function () {
var result = faker.unique(faker.internet.email, ['a', 'b', 'c']); // third argument is provider, or domain for email
assert.ok(result.match(/\@c/));
});
@@ -32,7 +32,7 @@ describe("unique.js", function () {
try {
result = faker.unique(faker.internet.protocol, [], { maxTime: 1, maxRetries: 9999, exclude: ['https', 'http'] });
} catch (err) {
- assert.equal(err.message.substr(0, 16), 'exceeded maxTime');
+ assert.equal(err.message.substr(0, 16), 'Exceeded maxTime');
}
});
@@ -41,11 +41,11 @@ describe("unique.js", function () {
try {
result = faker.unique(faker.internet.protocol, [], { maxTime: 5000, maxRetries: 5, exclude: ['https', 'http'] });
} catch (err) {
- assert.equal(err.message.substr(0, 19), 'exceeded maxRetries');
+ assert.equal(err.message.substr(0, 19), 'Exceeded maxRetries');
}
});
- it("is able to call a function with arguments and return a result", function () {
+ it("is able to call last function with arguments and return a result", function () {
var result = faker.unique(faker.internet.email, ['a', 'b', 'c']); // third argument is provider, or domain for email
assert.ok(result.match(/\@c/));
});