Files
2026-04-19 23:22:05 +08:00

17 lines
577 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import assert from 'node:assert/strict';
import test from 'node:test';
import { isDndProductKey } from './productKey';
void test('isDndProductKey: пример пользователя', () => {
assert.equal(isDndProductKey('DND-CEBEC1BF-AD0B-4312-BFDD-675AFF5955FD'), true);
});
void test('isDndProductKey: токен с точкой — нет', () => {
assert.equal(isDndProductKey('eyJ.xxx'), false);
});
void test('isDndProductKey: пробелы по краям', () => {
assert.equal(isDndProductKey(' DND-CEBEC1BF-AD0B-4312-BFDD-675AFF5955FD '), true);
});