From c358bc200518a4e8c7b502cc3e96c37cc043e36c Mon Sep 17 00:00:00 2001 From: Thomas Wilkerling Date: Thu, 17 Apr 2025 15:03:16 +0200 Subject: [PATCH] use proper test files directory --- test/async.js | 2 +- test/package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/async.js b/test/async.js index 357d8de..d342a8e 100644 --- a/test/async.js +++ b/test/async.js @@ -57,7 +57,7 @@ if(!build_light) describe("Add (Async)", function(){ if(duration) break; } - expect(duration).to.equal(0); + expect(duration).to.closeTo(0, 2); for(let i = 0; i < 999999999; i++){ await index.addAsync(i, "foo"); diff --git a/test/package.json b/test/package.json index 2d3b8d4..9b4f950 100644 --- a/test/package.json +++ b/test/package.json @@ -1,11 +1,11 @@ { "name": "flexsearch-test", "scripts": { - "test": "mocha test/*.js --exit", - "test:coverage": "c8 -c test/.c8rc.json mocha test/*.js --exit", - "test:keystore": "set NODE_OPTIONS=--max-old-space-size=16000 && c8 -c test/.c8rc.json mocha test/keystore.js --exit", - "test:db": "c8 -c test/.c8rc.json mocha test/persistent.*.js --exit", - "test:all": "npx mocha test/*.js --exit module/bundle && npx mocha test/*.js --exit module-debug/bundle && npx mocha test/*.js --exit module-min/bundle && npx mocha test/*.js --exit flexsearch.bundle.debug && npx mocha test/*.js --exit flexsearch.bundle.min && npx mocha test/*.js --exit flexsearch.bundle.module.debug && npx mocha test/*.js --exit flexsearch.bundle.module.min && npx mocha test/*.js --exit flexsearch.compact.debug && npx mocha test/*.js --exit flexsearch.compact.min && npx mocha test/*.js --exit flexsearch.compact.module.debug && npx mocha test/*.js --exit flexsearch.compact.module.min && npx mocha test/*.js --exit flexsearch.es5.debug && npx mocha test/*.js --exit flexsearch.es5.min && npx mocha test/*.js --exit flexsearch.light.debug && npx mocha test/*.js --exit flexsearch.light.min && npx mocha test/*.js --exit flexsearch.light.module.debug && npx mocha test/*.js --exit flexsearch.light.module.min" + "test": "mocha ./*.js --exit", + "test:coverage": "c8 -c ./.c8rc.json mocha ./*.js --exit", + "test:keystore": "set NODE_OPTIONS=--max-old-space-size=16000 && c8 -c ./.c8rc.json mocha ./keystore.js --exit", + "test:db": "c8 -c ./.c8rc.json mocha ./persistent.*.js --exit", + "test:all": "npx mocha ./*.js --exit module/bundle && npx mocha ./*.js --exit module-debug/bundle && npx mocha ./*.js --exit module-min/bundle && npx mocha ./*.js --exit flexsearch.bundle.debug && npx mocha ./*.js --exit flexsearch.bundle.min && npx mocha ./*.js --exit flexsearch.bundle.module.debug && npx mocha ./*.js --exit flexsearch.bundle.module.min && npx mocha ./*.js --exit flexsearch.compact.debug && npx mocha ./*.js --exit flexsearch.compact.min && npx mocha ./*.js --exit flexsearch.compact.module.debug && npx mocha ./*.js --exit flexsearch.compact.module.min && npx mocha ./*.js --exit flexsearch.es5.debug && npx mocha ./*.js --exit flexsearch.es5.min && npx mocha ./*.js --exit flexsearch.light.debug && npx mocha ./*.js --exit flexsearch.light.min && npx mocha ./*.js --exit flexsearch.light.module.debug && npx mocha ./*.js --exit flexsearch.light.module.min" }, "devDependencies": { "c8": "^10.1.3",