diff options
| author | Iaroslav Popov <[email protected]> | 2017-08-10 15:18:05 +0200 |
|---|---|---|
| committer | Iaroslav Popov <[email protected]> | 2017-08-10 15:18:05 +0200 |
| commit | 496c81d2422ab5fd20dcb52dfc9dd22bdb773613 (patch) | |
| tree | ee2ad81231bbd6ea2f730ee02113ebf04e41b7d2 /test | |
| parent | 6cdb93efcbcaf222ac061cee5532374f72ea073e (diff) | |
| download | faker-496c81d2422ab5fd20dcb52dfc9dd22bdb773613.tar.xz faker-496c81d2422ab5fd20dcb52dfc9dd22bdb773613.zip | |
add alphanumeric symbol * to helpers.replaceSymbols
Diffstat (limited to 'test')
| -rw-r--r-- | test/helpers.unit.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/helpers.unit.js b/test/helpers.unit.js index 707575ff..0fcc5876 100644 --- a/test/helpers.unit.js +++ b/test/helpers.unit.js @@ -21,6 +21,15 @@ describe("helpers.js", function () { }); }); + describe("replaceSymbols()", function () { + context("when '*' passed", function () { + it("replaces it with alphanumeric", function(){ + var num = faker.helpers.replaceSymbols('*AB'); + assert.ok(num.match(/\wAB/)); + }); + }); + }); + describe("shuffle()", function () { it("the output is the same length as the input", function () { sinon.spy(faker.random, 'number'); |
