import assert from 'node:assert/strict';
import test from 'node:test';

import { buildAuditQueryPath } from './audit-api';

test('buildAuditQueryPath keeps only non-empty audit filters', () => {
  assert.equal(
    buildAuditQueryPath({
      actorId: 'm-8',
      entityType: 'dev_task',
      entityId: '',
      take: '25',
    }),
    '/audit?actorId=m-8&entityType=dev_task&take=25',
  );
});
