1
0
Fork 0
mirror of https://github.com/CorentinTh/it-tools.git synced 2025-07-24 07:39:36 +02:00
it-tools/src/tools/hash-text/hash-text.service.test.ts
2022-08-03 17:16:03 +02:00

15 lines
570 B
TypeScript

import { describe, expect, it } from 'vitest';
import { convertHexToBin } from './hash-text.service';
describe('hash text', () => {
describe('convertHexToBin', () => {
it('convert hex to bin', () => {
expect(convertHexToBin('')).toEqual('');
expect(convertHexToBin('FF')).toEqual('11111111');
expect(convertHexToBin('F'.repeat(200))).toEqual('1111'.repeat(200));
expect(convertHexToBin('2123006AD00F694CE120')).toEqual(
'00100001001000110000000001101010110100000000111101101001010011001110000100100000',
);
});
});
});