You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, I tried something similar with your repository by changing the import in your test as follows:
diff --git a/bench/index.ts b/bench/index.ts
index 4eec1a3..ea26122 100644
--- a/bench/index.ts+++ b/bench/index.ts@@ -1,4 +1,6 @@-import Benchmark, { CompareBy } from '../lib';+import Benchmark, { CompareBy } from '../dist/index.min.js';++console.log(JSON.stringify(Benchmark, null, 2))
(async () => {
// let benchmark = new Benchmark("Regexp test", {
and I encountered the same problem:
$ yarn run test
yarn run v1.22.17
$ node ./index.js
{
"CompareBy": {
"MeanTime": "meanTime",
"MedianTime": "medianTime",
"StandardDeviation": "standardDeviation",
"MaxTime": "maxTime",
"MinTime": "minTime",
"Hz": "hz",
"RunTime": "runTime",
"Cycles": "cycles",
"Percent": "percent"
}
}
/.../buffalo-bench/bench/index.ts:22
let suite = new import_index_min.default.Suite("String comparison", {
^
TypeError: import_index_min.default.Suite is not a constructor
Also, I noticed your dist/index.min.js currently mentions version 1.0.1, but it was updated for the 1.0.2 release.
Perhaps, once you've fixed the export issue, you need to (a) add a test for dist/index.min.js and (b) document your release steps, so you won't have these problems in the future.
The text was updated successfully, but these errors were encountered:
Is there a context in which const Benchmark = require("buffalo-bench") works, as demonstrated in the README? If not, then perhaps the README needs to be updated.
I'm running into a strange problem in which
Benchmark
does not seem to be exported bydist/index.min.js
.The following code:
produced the following error:
So then I changed it to this:
which produced this:
Then, I tried something similar with your repository by changing the
import
in your test as follows:and I encountered the same problem:
Also, I noticed your
dist/index.min.js
currently mentions version 1.0.1, but it was updated for the 1.0.2 release.Perhaps, once you've fixed the export issue, you need to (a) add a test for
dist/index.min.js
and (b) document your release steps, so you won't have these problems in the future.The text was updated successfully, but these errors were encountered: