summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/helpers/convertAAGUIDToString.test.ts
blob: 3848fb5b9b5bdc825c18f547043c5500eee12f6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import { assertEquals } from 'https://deno.land/std@0.198.0/assert/mod.ts';

import { convertAAGUIDToString } from './convertAAGUIDToString.ts';
import { isoUint8Array } from './iso/index.ts';

Deno.test('should convert buffer to UUID string', () => {
  const uuid = convertAAGUIDToString(
    isoUint8Array.fromHex('adce000235bcc60a648b0b25f1f05503'),
  );

  assertEquals(uuid, 'adce0002-35bc-c60a-648b-0b25f1f05503');
});