diff --git a/package.json b/package.json index 5073f2e11a..013c47e73f 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "lint:markdown": "markdownlint-cli2", "lint:standard": "standard | snazzy", "lint:typescript": "eslint -c types/.eslintrc.json types/**/*.d.ts test/types/**/*.test-d.ts", - "prepublishOnly": "tap --no-check-coverage test/build/**.test.js", + "prepublishOnly": "PREPUBLISH=true tap --no-check-coverage test/build/**.test.js", "test": "npm run lint && npm run unit && npm run test:typescript", "test:ci": "npm run unit -- -R terse --cov --coverage-report=lcovonly && npm run test:typescript", "test:report": "npm run lint && npm run unit:report && npm run test:typescript", diff --git a/test/build/error-serializer.test.js b/test/build/error-serializer.test.js index d2ca8db6d0..8e8c8b12a2 100644 --- a/test/build/error-serializer.test.js +++ b/test/build/error-serializer.test.js @@ -23,7 +23,9 @@ test('check generated code syntax', async (t) => { t.equal(result[0].fatalErrorCount, 0) }) -test('ensure the current error serializer is latest', async (t) => { +const isPrebublish = !!process.env.PREPUBLISH + +test('ensure the current error serializer is latest', { skip: !isPrebublish }, async (t) => { t.plan(1) const current = await fs.promises.readFile(path.resolve('lib/error-serializer.js'))