aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMikhail Fedosov <[email protected]>2013-03-16 02:00:15 +0400
committerMikhail Fedosov <[email protected]>2013-03-16 02:00:15 +0400
commit87c6bc947423d03a9aadffe4b8bb4b7257f764fd (patch)
tree1df5885a240736485d40809ad8ae94be5597d97c /test
parent64e25936b14e662ddfe090a65caad630555486a6 (diff)
downloadfaker-87c6bc947423d03a9aadffe4b8bb4b7257f764fd.tar.xz
faker-87c6bc947423d03a9aadffe4b8bb4b7257f764fd.zip
js cleanup (jshint)
Diffstat (limited to 'test')
-rw-r--r--test/address.unit.js4
-rw-r--r--test/helpers.unit.js28
-rw-r--r--test/internet.unit.js12
3 files changed, 22 insertions, 22 deletions
diff --git a/test/address.unit.js b/test/address.unit.js
index edf0a7ac..5c515a5c 100644
--- a/test/address.unit.js
+++ b/test/address.unit.js
@@ -164,12 +164,12 @@ describe("address.js", function () {
sinon.spy(Faker.random, 'array_element');
var address = Faker.Address.secondaryAddress();
-
+
var expected_array = [
'Apt. ###',
'Suite ###'
];
-
+
assert.ok(address);
assert.ok(Faker.random.array_element.calledWith(expected_array));
Faker.random.array_element.restore();
diff --git a/test/helpers.unit.js b/test/helpers.unit.js
index 4c7ee808..3549099d 100644
--- a/test/helpers.unit.js
+++ b/test/helpers.unit.js
@@ -4,17 +4,17 @@ if (typeof module !== 'undefined') {
var Faker = require('../index');
}
-describe("helpers.js", function() {
- describe("replaceSymbolWithNumber()", function() {
- context("when no symbol passed in", function() {
- it("uses '#' by default", function() {
+describe("helpers.js", function () {
+ describe("replaceSymbolWithNumber()", function () {
+ context("when no symbol passed in", function () {
+ it("uses '#' by default", function () {
var num = Faker.Helpers.replaceSymbolWithNumber('#AB');
assert.ok(num.match(/\dAB/));
});
});
- context("when symbol passed in", function() {
- it("replaces that symbol with integers", function() {
+ context("when symbol passed in", function () {
+ it("replaces that symbol with integers", function () {
var num = Faker.Helpers.replaceSymbolWithNumber('#AB', 'A');
assert.ok(num.match(/#\dB/));
});
@@ -28,31 +28,31 @@ describe("helpers.js", function() {
});
});
- describe("createCard()", function() {
- it("returns an object", function() {
+ describe("createCard()", function () {
+ it("returns an object", function () {
var card = Faker.Helpers.createCard();
assert.ok(typeof card === 'object');
});
});
- describe("userCard()", function() {
- it("returns an object", function() {
+ describe("userCard()", function () {
+ it("returns an object", function () {
var card = Faker.Helpers.userCard();
assert.ok(typeof card === 'object');
});
});
// Make sure we keep this function for backward-compatibility.
- describe("randomNumber()", function() {
- it("returns an integer", function() {
+ describe("randomNumber()", function () {
+ it("returns an integer", function () {
var num = Faker.Helpers.randomNumber();
assert.ok(typeof num === 'number');
});
});
// Make sure we keep this function for backward-compatibility.
- describe("randomize()", function() {
- it("returns a random element from an array", function() {
+ describe("randomize()", function () {
+ it("returns a random element from an array", function () {
var arr = ['a', 'b', 'c'];
var elem = Faker.Helpers.randomize(arr);
assert.ok(elem);
diff --git a/test/internet.unit.js b/test/internet.unit.js
index 35b3a0f1..d7d823cf 100644
--- a/test/internet.unit.js
+++ b/test/internet.unit.js
@@ -49,8 +49,8 @@ describe("internet.js", function () {
});
});
- describe("domainName()", function() {
- it("returns a domainWord plus a random suffix", function() {
+ describe("domainName()", function () {
+ it("returns a domainWord plus a random suffix", function () {
sinon.stub(Faker.Internet, 'domainWord').returns('bar');
sinon.stub(Faker.random, 'domain_suffix').returns('net');
@@ -63,8 +63,8 @@ describe("internet.js", function () {
});
});
- describe("domainWord()", function() {
- it("returns a lower-case firstName", function() {
+ describe("domainWord()", function () {
+ it("returns a lower-case firstName", function () {
sinon.stub(Faker.random, 'first_name').returns('FOO');
var domain_word = Faker.Internet.domainWord();
@@ -75,8 +75,8 @@ describe("internet.js", function () {
});
});
- describe("ip()", function() {
- it("returns a random IP address with four parts", function() {
+ describe("ip()", function () {
+ it("returns a random IP address with four parts", function () {
var ip = Faker.Internet.ip();
var parts = ip.split('.');
assert.equal(parts.length, 4);