Skip to content

Commit 748795f

Browse files
authored
chore: add correct test case for #409 (#441)
1 parent bd45fcd commit 748795f

15 files changed

+52
-79
lines changed

tests/e2e/__snapshots__/e2e.spec.ts.snap

-8
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,6 @@ exports[`e2e cases > should exec eslint successfully > nearestTsconfig 1`] = `
6464
}
6565
`;
6666

67-
exports[`e2e cases > should exec eslint successfully > nestedPackageJson 1`] = `
68-
{
69-
"exitCode": 0,
70-
"stderr": "",
71-
"stdout": "",
72-
}
73-
`;
74-
7567
exports[`e2e cases > should exec eslint successfully > withJsExtension 1`] = `
7668
{
7769
"exitCode": 0,

tests/e2e/nestedPackageJson/.eslintrc.cjs

-1
This file was deleted.

tests/e2e/nestedPackageJson/.gitignore

-1
This file was deleted.

tests/e2e/nestedPackageJson/package.json

-8
This file was deleted.

tests/e2e/nestedPackageJson/test.ts

-1
This file was deleted.

tests/e2e/nestedPackageJson/tsconfig.json

-5
This file was deleted.

tests/e2e/nestedPackageJson/yarn.lock

-55
This file was deleted.
Binary file not shown.
Binary file not shown.

tests/unit/pnp/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"type": "module",
44
"packageManager": "[email protected]",
55
"devDependencies": {
6+
"@atlaskit/pragmatic-drag-and-drop": "^1.5.2",
67
"lodash.zip": "^4.2.0"
78
}
89
}

tests/unit/pnp/yarn.lock

+42
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,33 @@ __metadata:
55
version: 8
66
cacheKey: 10c0
77

8+
"@atlaskit/pragmatic-drag-and-drop@npm:^1.5.2":
9+
version: 1.5.2
10+
resolution: "@atlaskit/pragmatic-drag-and-drop@npm:1.5.2"
11+
dependencies:
12+
"@babel/runtime": "npm:^7.0.0"
13+
bind-event-listener: "npm:^3.0.0"
14+
raf-schd: "npm:^4.0.3"
15+
checksum: 10c0/1dace49fa384b532ca3ba363931e8c3b3d92632c02b259bc2823d2b443a8dd903a2c218d96aaceb3b715b9925a2438a570d09ed82287ab7180eabef89fd0fa43
16+
languageName: node
17+
linkType: hard
18+
19+
"@babel/runtime@npm:^7.0.0":
20+
version: 7.27.0
21+
resolution: "@babel/runtime@npm:7.27.0"
22+
dependencies:
23+
regenerator-runtime: "npm:^0.14.0"
24+
checksum: 10c0/35091ea9de48bd7fd26fb177693d64f4d195eb58ab2b142b893b7f3fa0f1d7c677604d36499ae0621a3703f35ba0c6a8f6c572cc8f7dc0317213841e493cf663
25+
languageName: node
26+
linkType: hard
27+
28+
"bind-event-listener@npm:^3.0.0":
29+
version: 3.0.0
30+
resolution: "bind-event-listener@npm:3.0.0"
31+
checksum: 10c0/08eadf1c7d3a58633f25c2bbd8dc066f77ef4e5df1049e81ff2f43a40c00f6581aba37387caa4878782b1f1f7c337b827757f52b637052a465ad74a7e1db8def
32+
languageName: node
33+
linkType: hard
34+
835
"lodash.zip@npm:^4.2.0":
936
version: 4.2.0
1037
resolution: "lodash.zip@npm:4.2.0"
@@ -16,6 +43,21 @@ __metadata:
1643
version: 0.0.0-use.local
1744
resolution: "pnp@workspace:."
1845
dependencies:
46+
"@atlaskit/pragmatic-drag-and-drop": "npm:^1.5.2"
1947
lodash.zip: "npm:^4.2.0"
2048
languageName: unknown
2149
linkType: soft
50+
51+
"raf-schd@npm:^4.0.3":
52+
version: 4.0.3
53+
resolution: "raf-schd@npm:4.0.3"
54+
checksum: 10c0/ecabf0957c05fad059779bddcd992f1a9d3a35dfea439a6f0935c382fcf4f7f7fa60489e467b4c2db357a3665167d2a379782586b59712bb36c766e02824709b
55+
languageName: node
56+
linkType: hard
57+
58+
"regenerator-runtime@npm:^0.14.0":
59+
version: 0.14.1
60+
resolution: "regenerator-runtime@npm:0.14.1"
61+
checksum: 10c0/1b16eb2c4bceb1665c89de70dcb64126a22bc8eb958feef3cd68fe11ac6d2a4899b5cd1b80b0774c7c03591dc57d16631a7f69d2daa2ec98100e2f29f7ec4cc4
62+
languageName: node
63+
linkType: hard

tests/unit/unit.spec.ts

+9
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ describe('createTypeScriptImportResolver', async () => {
3636
"path": "<ROOT>/tests/unit/pnp/.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-e596da80a6.zip/node_modules/lodash.zip/index.js",
3737
}
3838
`)
39+
40+
expect(
41+
resolver.resolve('@atlaskit/pragmatic-drag-and-drop/combine', testfile),
42+
).toMatchInlineSnapshot(`
43+
{
44+
"found": true,
45+
"path": "<ROOT>/tests/unit/pnp/.yarn/cache/@atlaskit-pragmatic-drag-and-drop-npm-1.5.2-3241d4f843-1dace49fa3.zip/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/types/entry-point/combine.d.ts",
46+
}
47+
`)
3948
})
4049

4150
it('should resolve .d.ts with .ts extension', () => {

0 commit comments

Comments
 (0)