We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 090a43b commit 7a76440Copy full SHA for 7a76440
test/createRandomString.test.js
@@ -0,0 +1,25 @@
1
+
2
+import { generateRandomString } from "../src";
3
4
5
6
7
+describe("Communications between a Mobile App and a Device App", () => {
8
9
+ test('tests for messages sent between a mobile app and a device app', () => {
10
+ const stringLength = 20;
11
+ const generatedStrings = [];
12
+ for (let i = 0; i < 1000; i++) {
13
+ const randomString1 = generateRandomString(stringLength);
14
+ console.log(randomString1);
15
+ expect(randomString1.length).toBe(stringLength);
16
+ const duplicates = generatedStrings.filter(f => f === randomString1);
17
+ //expect(duplicates.length).toBe(0);
18
+ generatedStrings.push(randomString1);
19
+ }
20
21
22
+ });
23
24
25
+});
0 commit comments