From f4139def925908c64c20c8a091f736394d5dcc72 Mon Sep 17 00:00:00 2001 From: nmccready Date: Fri, 13 Sep 2024 10:50:18 -0400 Subject: [PATCH] chore: remove mock publish im over it --- integration/publish.int.test.js | 41 --------------------------------- package.json | 2 +- scripts/mockPublish | 9 -------- 3 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 integration/publish.int.test.js delete mode 100755 scripts/mockPublish diff --git a/integration/publish.int.test.js b/integration/publish.int.test.js deleted file mode 100644 index 4040456..0000000 --- a/integration/publish.int.test.js +++ /dev/null @@ -1,41 +0,0 @@ -const os = require('os'); - -const { exec } = require('child_process'); -const { rm } = require('fs/promises'); - -const isWindows = os.platform() === 'win32'; - -const cleanUp = async () => { - return rm('./tmp', { recursive: true, force: true }); -}; - -function makeTestPackage(cb) { - if (isWindows) { - this.skip(); - } - - exec('./scripts/mockPublish', cb); -} - -describe('mock publish', () => { - beforeEach(makeTestPackage); - afterEach(cleanUp); - - // with regards to averting npm publishing disasters https://github.com/gulp-sourcemaps/gulp-sourcemaps/issues/246 - it('can load a published version', (done) => { - if (isWindows) { - this.skip(); - } - - try { - // attempt to load a packed / unpacked potential deployed version - // eslint-disable-next-line import/no-unresolved - require('../tmp/package/lib/index'); - } catch (error) { - done(error); - return; - } - - done(); - }); -}); diff --git a/package.json b/package.json index 0727881..e8fdae3 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "mocha": "mocha", "prepack": "npm run build", "prepare": "npx sort-package-json", - "test": "npm run build && npx jest ./test && npx jest ./integration", + "test": "npm run build && npx jest", "test:ci": "npm run build && npm run test --coverage && npm run coveralls", "preversion": "npm run build" }, diff --git a/scripts/mockPublish b/scripts/mockPublish deleted file mode 100755 index c73fcfe..0000000 --- a/scripts/mockPublish +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -e -set -o pipefail - -mkdir -p ./tmp -npm pack --pack-destination ./tmp -tar xvzf tmp/*.tgz -C ./tmp - -exit 0