17 lines
577 B
TypeScript
17 lines
577 B
TypeScript
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);
|
||
});
|