diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2020-09-10 06:10:45 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2020-09-16 18:18:48 +0300 |
commit | 2019abdf159eb13c9fb3a2bd2f35897a8f52b0d9 (patch) | |
tree | f17ca90816469c6051306999d2ad2984a0292c8e /tap-snapshots | |
parent | 3743a42c854d9ea7e333d7ff86d206a4b079a352 (diff) |
test: add lib/link.js tests
- Added ELINKGLOBAL error code for when using --global
- Added tests for lib/link.js
- Do not reify, only load globals when linking a pkg to a local prefix
- Fixes: #1777
Diffstat (limited to 'tap-snapshots')
-rw-r--r-- | tap-snapshots/test-lib-link.js-TAP.test.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tap-snapshots/test-lib-link.js-TAP.test.js b/tap-snapshots/test-lib-link.js-TAP.test.js new file mode 100644 index 000000000..211417d31 --- /dev/null +++ b/tap-snapshots/test-lib-link.js-TAP.test.js @@ -0,0 +1,19 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/lib/link.js TAP link global linked pkg to local nm when using args > should create a local symlink to global pkg 1`] = ` +{CWD}/test/lib/link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/a -> {CWD}/test/lib/link-link-global-linked-pkg-to-local-nm-when-using-args/global-prefix/lib/node_modules/a +{CWD}/test/lib/link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/@myscope/bar -> {CWD}/test/lib/link-link-global-linked-pkg-to-local-nm-when-using-args/global-prefix/lib/node_modules/@myscope/bar +{CWD}/test/lib/link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/test-pkg-link -> {CWD}/test/lib/link-link-global-linked-pkg-to-local-nm-when-using-args/test-pkg-link +{CWD}/test/lib/link-link-global-linked-pkg-to-local-nm-when-using-args/my-project/node_modules/@myscope/linked -> {CWD}/test/lib/link-link-global-linked-pkg-to-local-nm-when-using-args/scoped-linked + +` + +exports[`test/lib/link.js TAP link to globalDir when in current working dir of pkg and no args > should create a global link to current pkg 1`] = ` +{CWD}/test/lib/link-link-to-globalDir-when-in-current-working-dir-of-pkg-and-no-args/global-prefix/lib/node_modules/test-pkg-link -> {CWD}/test/lib/link-link-to-globalDir-when-in-current-working-dir-of-pkg-and-no-args/test-pkg-link + +` |