From fbc445067f393b55f067e1a8c9f8cb2abc2b5077 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Mon, 11 Jul 2022 15:17:40 +0200 Subject: [PATCH] run error serializer check only before release (#4130) Signed-off-by: Matteo Collina --- package.json | 2 +- test/build/error-serializer.test.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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'))