Skip to content

Commit 316aaff

Browse files
committed
test(packageresolution): improve test without snapshots not needed
1 parent 36949bd commit 316aaff

File tree

3 files changed

+6
-147
lines changed

3 files changed

+6
-147
lines changed

integration-tests/lockfile/__snapshots__/lockfile.test.ts.snap

Lines changed: 0 additions & 142 deletions
This file was deleted.

integration-tests/lockfile/lockfile.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
#!/usr/bin/env bash
2+
13
# make sure errors stop the script
24
set -e
35

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

8-
function testLockFile() {
10+
testLockFile() {
911
echo "Version test $1"
1012
npm i --lockfile-version $1
1113

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

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

2627
echo "test lockfile v1"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import { runIntegrationTest } from "../runIntegrationTest"
2-
runIntegrationTest({ projectName: "lockfile", shouldProduceSnapshots: true })
2+
runIntegrationTest({ projectName: "lockfile", shouldProduceSnapshots: false })

0 commit comments

Comments
 (0)