aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIaroslav Popov <[email protected]>2017-08-10 15:18:05 +0200
committerIaroslav Popov <[email protected]>2017-08-10 15:18:05 +0200
commit496c81d2422ab5fd20dcb52dfc9dd22bdb773613 (patch)
treeee2ad81231bbd6ea2f730ee02113ebf04e41b7d2 /test
parent6cdb93efcbcaf222ac061cee5532374f72ea073e (diff)
downloadfaker-496c81d2422ab5fd20dcb52dfc9dd22bdb773613.tar.xz
faker-496c81d2422ab5fd20dcb52dfc9dd22bdb773613.zip
add alphanumeric symbol * to helpers.replaceSymbols
Diffstat (limited to 'test')
-rw-r--r--test/helpers.unit.js9
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');