aboutsummaryrefslogtreecommitdiffstats
path: root/test/helpers/array-helpers.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/helpers/array-helpers.test.ts')
-rw-r--r--test/helpers/array-helpers.test.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/helpers/array-helpers.test.ts b/test/helpers/array-helpers.test.ts
new file mode 100644
index 000000000..e8060c2c4
--- /dev/null
+++ b/test/helpers/array-helpers.test.ts
@@ -0,0 +1,15 @@
1import { shuffleArray } from '../../src/helpers/array-helpers';
2
3describe('array_helpers', () => {
4 it('isValidExternalURL', () => {
5 const originalArray = ['a', 'b', 'c'];
6 const shuffledArray = shuffleArray(originalArray);
7
8 // Expect the arrays to not be exactly the same
9 expect(shuffledArray).not.toEqual(originalArray);
10
11 // Expect the arrays to be exactly the same
12 // when both are sorted alphabetically
13 expect(shuffledArray.sort()).toEqual(originalArray.sort());
14 });
15});