aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/random.unit.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/random.unit.js b/test/random.unit.js
index 6071767b..da1274fd 100644
--- a/test/random.unit.js
+++ b/test/random.unit.js
@@ -61,4 +61,12 @@ describe("random.js", function () {
assert.equal(opts.max, max);
});
});
+
+ describe('UUID', function() {
+ it('should generate a valid UUID', function() {
+ var UUID = faker.random.uuid();
+ var RFC4122 = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
+ assert.ok(RFC4122.test(UUID));
+ })
+ })
});