From 081bd7b0beb77aa94d8b83544830666e9528f899 Mon Sep 17 00:00:00 2001 From: Dawid Sowa Date: Fri, 29 Nov 2024 16:21:05 +0100 Subject: [PATCH] test: add `generateRolaChallenge` test --- .../src/helpers/generate-rola-challenge.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 packages/dapp-toolkit/src/helpers/generate-rola-challenge.spec.ts diff --git a/packages/dapp-toolkit/src/helpers/generate-rola-challenge.spec.ts b/packages/dapp-toolkit/src/helpers/generate-rola-challenge.spec.ts new file mode 100644 index 00000000..aee907d5 --- /dev/null +++ b/packages/dapp-toolkit/src/helpers/generate-rola-challenge.spec.ts @@ -0,0 +1,9 @@ +import { describe, expect, it } from 'vitest' +import { generateRolaChallenge } from './generate-rola-challenge' + +describe('generateRolaChallenge', () => { + it('should generate valid string', () => { + const challenge = generateRolaChallenge() + expect(challenge).toMatch(/^[0-9a-f]{64}$/) + }) +})