Skip to content

Commit 66184c6

Browse files
committed
test(packageresolution): improve test without snapshots not needed
1 parent cc8279d commit 66184c6

File tree

3 files changed

+6
-147
lines changed

3 files changed

+6
-147
lines changed

Diff for: integration-tests/lockfile/__snapshots__/lockfile.test.ts.snap

-142
This file was deleted.

Diff for: integration-tests/lockfile/lockfile.sh

+5-4
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"

Diff for: integration-tests/lockfile/lockfile.test.ts

+1-1
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)