diff options
| author | Adam Walker <[email protected]> | 2021-05-19 22:59:53 -0400 |
|---|---|---|
| committer | Adam Walker <[email protected]> | 2021-05-19 22:59:53 -0400 |
| commit | c0a172dc5d6308731fd879db2ffcddf4714370f5 (patch) | |
| tree | 8e261554166973f3d60709b800f0278f513aa1b0 | |
| parent | 45204bec008229f5b281ca5fdff0a25aece706a5 (diff) | |
| download | faker-c0a172dc5d6308731fd879db2ffcddf4714370f5.tar.xz faker-c0a172dc5d6308731fd879db2ffcddf4714370f5.zip | |
Revert formatting changes to lib/index.js made by prettier
| -rw-r--r-- | lib/index.js | 16 | ||||
| -rw-r--r-- | test/word.unit.js | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/index.js b/lib/index.js index aaf6c69e..ba56c77a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -21,7 +21,7 @@ * * @namespace faker */ -function Faker (opts) { + function Faker (opts) { var self = this; @@ -161,17 +161,17 @@ function Faker (opts) { var Word = require('./word'); self.word = new Word(self); -} +}; Faker.prototype.setLocale = function (locale) { this.locale = locale; -}; +} -Faker.prototype.seed = function (value) { - var Random = require("./random"); - var Datatype = require("./datatype"); +Faker.prototype.seed = function(value) { + var Random = require('./random'); + var Datatype = require('./datatype'); this.seedValue = value; this.random = new Random(this, this.seedValue); this.datatype = new Datatype(this, this.seedValue); -}; -module["exports"] = Faker; +} +module['exports'] = Faker;
\ No newline at end of file diff --git a/test/word.unit.js b/test/word.unit.js index 071b6cfd..9a0c53a5 100644 --- a/test/word.unit.js +++ b/test/word.unit.js @@ -17,12 +17,12 @@ describe.only("word.js", function () { // Perform the same three tests for each method. methods.forEach(function (method) { describe(method + "()", function () { - it("returns random value from " + method + " array", function () { + it("returns random value from " + method + " array", function () { var word = faker.word[method](); assert.ok(faker.definitions.word[method].includes(word)); }); it("optional length parameter returns expected result", function () { - var wordLength = parseInt(Math.random() * 7 + 3); + var wordLength = 5; var word = faker.word[method](wordLength); assert.ok(faker.definitions.word[method].includes(word)); assert.ok(word.length == wordLength); |
