import { describe, expect, test } from 'vitest';
import { bytesToUint256LittleEndian, uint256ToBytesLittleEndian } from '../subgraph.js';

describe('BigInt Conversion Functions', () => {
  test('converts uint256 to bytes and back (little endian)', () => {
    const mockId = uint256ToBytesLittleEndian(3n);
    const expected = new Uint8Array(32);
    expected[0] = 3;
    expect(mockId).toEqual(expected);
    expect(bytesToUint256LittleEndian(mockId)).toEqual(3n);
  });
});
