diff --git a/.c8rc.json b/.c8rc.json index 44a553c..4192470 100644 --- a/.c8rc.json +++ b/.c8rc.json @@ -5,11 +5,11 @@ "functions": 100, "branches": 100, "check-coverage": true, - "extension": [".js", ".mjs"], + "extension": [".js"], "instrument": false, "src": ".", "reporter": ["lcov", "text-summary"], "reportDir": "./target/coverage", "tempDirectory": "./target/c8-temporary-output", - "exclude": ["target", "test", "benchmarks/", "eslint.config.mjs"] + "exclude": ["target", "test", "benchmarks/", "eslint.config.js"] } diff --git a/benchmarks/runtime.bench.js b/benchmarks/runtime.bench.js index 17846c7..5e38fe0 100644 --- a/benchmarks/runtime.bench.js +++ b/benchmarks/runtime.bench.js @@ -78,8 +78,8 @@ function lintManyFilesWithAllRecommendedRules(options) { const iterations = 50; -describe('runtime', function () { - it('should not take longer as the defined budget to lint many files with the recommended config', function () { +describe('runtime', function() { + it('should not take longer as the defined budget to lint many files with the recommended config', function() { const cpuAgnosticBudget = 3_250_000; const budget = cpuAgnosticBudget / cpuSpeed; @@ -87,16 +87,24 @@ describe('runtime', function () { lintManyFilesWithAllRecommendedRules({ numberOfFiles: 350 }); }, iterations); - assert.strictEqual(medianDuration < budget, true); + assert.strictEqual( + medianDuration < budget, + true, + `Expected duration ${medianDuration} to be lower than budget ${budget}` + ); }); - it('should not consume more memory as the defined budget to lint many files with the recommended config', function () { - const budget = 1_250_000; + it('should not consume more memory as the defined budget to lint many files with the recommended config', function() { + const budget = 1_750_000; const { medianMemory } = runSyncBenchmark(() => { lintManyFilesWithAllRecommendedRules({ numberOfFiles: 350 }); }, iterations); - assert.strictEqual(medianMemory < budget, true); + assert.strictEqual( + medianMemory < budget, + true, + `Expected memory ${medianMemory} to be lower than budget ${budget}` + ); }); }); diff --git a/benchmarks/startup.bench.js b/benchmarks/startup.bench.js index 822c2ae..c824073 100644 --- a/benchmarks/startup.bench.js +++ b/benchmarks/startup.bench.js @@ -12,16 +12,24 @@ describe('startup / require time', function () { await importFresh('../index.js'); }, iterations); - assert.strictEqual(medianDuration < budget, true); + assert.strictEqual( + medianDuration < budget, + true, + `Expected duration ${medianDuration} to be lower than budget ${budget}` + ); }); it('should not consume more memory as the defined budget', async function () { - const budget = 50_000; + const budget = 225_000; const { medianMemory } = await runAsyncBenchmark(async () => { await importFresh('../index.js'); }, iterations); - assert.strictEqual(medianMemory < budget, true); + assert.strictEqual( + medianMemory < budget, + true, + `Expected memory ${medianMemory} to be lower than budget ${budget}` + ); }); }); diff --git a/package.json b/package.json index c6ea17c..75071e3 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "node": ">=20.0.0" }, "main": "index.js", + "exports": "./index.js", "files": [ "index.js", "lib/",