Skip to content

Commit

Permalink
Add benchmarking support for new CronExpressionParser interface
Browse files Browse the repository at this point in the history
  • Loading branch information
harrisiirak committed Feb 16, 2025
1 parent 683f585 commit 9ddf705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmarks/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export async function initializeBenchmark(version?: string) {
const { version: resolvedVersion, packagePath } = await VersionManager.getPackageVersion(version);
console.log(`Using cron-parser version ${resolvedVersion} for comparison`);

const parser = require(packagePath);
oldParseExpression = parser.parseExpression as ParseExpressionFn;
const module = require(packagePath);
oldParseExpression = (module.default?.parse as ParseExpressionFn) ?? (module.parseExpression as ParseExpressionFn);
}

interface BenchmarkStats {
Expand Down

0 comments on commit 9ddf705

Please sign in to comment.