test: use on-disk fixture for test-npm-install · nodejs/node@23f9275 · GitHub
Skip to content

Commit 23f9275

Browse files
joyeecheungaduh95
authored andcommitted
test: use on-disk fixture for test-npm-install
Instead of writing the fixtures on the fly in the test, put them in the fixtures directory that can be copied into a temporary directory to reproduce in a debugger. Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com> PR-URL: #62584 Refs: #61898 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
1 parent 4739c45 commit 23f9275

7 files changed

Lines changed: 34 additions & 50 deletions

File tree

Lines changed: 1 addition & 0 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "example",
3+
"version": "1.0.0",
4+
"main": "example.js"
5+
}

test/fixtures/npm-install/home/.gitkeep

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"example": "../example"
4+
}
5+
}

test/fixtures/npm-install/npm-prefix/.gitkeep

Whitespace-only changes.

test/fixtures/npm-install/npm-tmp/.gitkeep

Whitespace-only changes.

test/parallel/test-npm-install.js

Lines changed: 23 additions & 50 deletions

0 commit comments

Comments
 (0)