diff --git a/package.json b/package.json index a684724..bfc848e 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,9 @@ "publishConfig": { "access": "public" }, + "engines": { + "node": ">=20" + }, "homepage": "https://github.com/MapColonies/js-logger#readme", "devDependencies": { "@commitlint/cli": "^19.5.0", diff --git a/tests/index.spec.ts b/tests/index.spec.ts index d95d1a6..bc63913 100644 --- a/tests/index.spec.ts +++ b/tests/index.spec.ts @@ -16,7 +16,7 @@ describe('jsLogger', function () { logger.info('avi'); // Wait for the log to be written - await setTimeout(0); + await setTimeout(0.1); const logLine = JSON.parse(readFileSync('avi.log', { encoding: 'utf-8' })) as Record; expect(logLine).toHaveProperty('msg', 'avi'); @@ -28,7 +28,7 @@ describe('jsLogger', function () { logger.info('avi'); // Wait for the log to be written - await setTimeout(0); + await setTimeout(0.1); const logLine = JSON.parse(readFileSync('avi-base.log', { encoding: 'utf-8' })) as Record; @@ -42,7 +42,7 @@ describe('jsLogger', function () { logger.info('avi'); // Wait for the log to be written - await setTimeout(0); + await setTimeout(0.1); const logLine = JSON.parse(readFileSync('avi-caller.log', { encoding: 'utf-8' })) as Record;