import { defineHandler } from '@kb-labs/sdk';
import { runTests } from '@kb-labs/quality-core/tests';

// src/rest/handlers/tests-handler.ts
var tests_handler_default = defineHandler({
  async execute(ctx, input) {
    const { package: packageFilter, timeout, withCoverage, coverageOnly } = input.query ?? {};
    return runTests(ctx.cwd, {
      packageFilter,
      timeout: timeout || 6e4,
      withCoverage: withCoverage ?? false,
      coverageOnly: coverageOnly ?? false
    });
  }
});

export { tests_handler_default as default };
//# sourceMappingURL=tests-handler.js.map
//# sourceMappingURL=tests-handler.js.map