Skip to content

Commit

Permalink
test(packageresolution): improve test without snapshots not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Anas AIT ALI committed Dec 2, 2022
1 parent cc8279d commit 66184c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 147 deletions.
142 changes: 0 additions & 142 deletions integration-tests/lockfile/__snapshots__/lockfile.test.ts.snap

This file was deleted.

9 changes: 5 additions & 4 deletions integration-tests/lockfile/lockfile.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env bash

# make sure errors stop the script
set -e

echo "add patch-package"
npm i $1
alias patch-package=./node_modules/.bin/patch-package

function testLockFile() {
testLockFile() {
echo "Version test $1"
npm i --lockfile-version $1

Expand All @@ -18,9 +20,8 @@ function testLockFile() {
echo "patch-package should run"
patch-package left-pad

echo "SNAPSHOT: check patch with lockfile $1"
cat patches/left-pad+1.3.0.patch
echo "END SNAPSHOT"
echo "check that the patch is created"
test -f patches/left-pad+1.3.0.patch || exit 1
}

echo "test lockfile v1"
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/lockfile/lockfile.test.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import { runIntegrationTest } from "../runIntegrationTest"
runIntegrationTest({ projectName: "lockfile", shouldProduceSnapshots: true })
runIntegrationTest({ projectName: "lockfile", shouldProduceSnapshots: false })

0 comments on commit 66184c6

Please sign in to comment.