Skip to content

chore: add correct test case for #409 #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions tests/e2e/__snapshots__/e2e.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ exports[`e2e cases > should exec eslint successfully > nearestTsconfig 1`] = `
}
`;

exports[`e2e cases > should exec eslint successfully > nestedPackageJson 1`] = `
{
"exitCode": 0,
"stderr": "",
"stdout": "",
}
`;

exports[`e2e cases > should exec eslint successfully > withJsExtension 1`] = `
{
"exitCode": 0,
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/nestedPackageJson/.eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion tests/e2e/nestedPackageJson/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions tests/e2e/nestedPackageJson/package.json

This file was deleted.

1 change: 0 additions & 1 deletion tests/e2e/nestedPackageJson/test.ts

This file was deleted.

5 changes: 0 additions & 5 deletions tests/e2e/nestedPackageJson/tsconfig.json

This file was deleted.

55 changes: 0 additions & 55 deletions tests/e2e/nestedPackageJson/yarn.lock

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions tests/unit/pnp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"type": "module",
"packageManager": "yarn@4.8.1",
"devDependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.5.2",
"lodash.zip": "^4.2.0"
}
}
42 changes: 42 additions & 0 deletions tests/unit/pnp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ __metadata:
version: 8
cacheKey: 10c0

"@atlaskit/pragmatic-drag-and-drop@npm:^1.5.2":
version: 1.5.2
resolution: "@atlaskit/pragmatic-drag-and-drop@npm:1.5.2"
dependencies:
"@babel/runtime": "npm:^7.0.0"
bind-event-listener: "npm:^3.0.0"
raf-schd: "npm:^4.0.3"
checksum: 10c0/1dace49fa384b532ca3ba363931e8c3b3d92632c02b259bc2823d2b443a8dd903a2c218d96aaceb3b715b9925a2438a570d09ed82287ab7180eabef89fd0fa43
languageName: node
linkType: hard

"@babel/runtime@npm:^7.0.0":
version: 7.27.0
resolution: "@babel/runtime@npm:7.27.0"
dependencies:
regenerator-runtime: "npm:^0.14.0"
checksum: 10c0/35091ea9de48bd7fd26fb177693d64f4d195eb58ab2b142b893b7f3fa0f1d7c677604d36499ae0621a3703f35ba0c6a8f6c572cc8f7dc0317213841e493cf663
languageName: node
linkType: hard

"bind-event-listener@npm:^3.0.0":
version: 3.0.0
resolution: "bind-event-listener@npm:3.0.0"
checksum: 10c0/08eadf1c7d3a58633f25c2bbd8dc066f77ef4e5df1049e81ff2f43a40c00f6581aba37387caa4878782b1f1f7c337b827757f52b637052a465ad74a7e1db8def
languageName: node
linkType: hard

"lodash.zip@npm:^4.2.0":
version: 4.2.0
resolution: "lodash.zip@npm:4.2.0"
Expand All @@ -16,6 +43,21 @@ __metadata:
version: 0.0.0-use.local
resolution: "pnp@workspace:."
dependencies:
"@atlaskit/pragmatic-drag-and-drop": "npm:^1.5.2"
lodash.zip: "npm:^4.2.0"
languageName: unknown
linkType: soft

"raf-schd@npm:^4.0.3":
version: 4.0.3
resolution: "raf-schd@npm:4.0.3"
checksum: 10c0/ecabf0957c05fad059779bddcd992f1a9d3a35dfea439a6f0935c382fcf4f7f7fa60489e467b4c2db357a3665167d2a379782586b59712bb36c766e02824709b
languageName: node
linkType: hard

"regenerator-runtime@npm:^0.14.0":
version: 0.14.1
resolution: "regenerator-runtime@npm:0.14.1"
checksum: 10c0/1b16eb2c4bceb1665c89de70dcb64126a22bc8eb958feef3cd68fe11ac6d2a4899b5cd1b80b0774c7c03591dc57d16631a7f69d2daa2ec98100e2f29f7ec4cc4
languageName: node
linkType: hard
9 changes: 9 additions & 0 deletions tests/unit/unit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ describe('createTypeScriptImportResolver', async () => {
"path": "<ROOT>/tests/unit/pnp/.yarn/cache/lodash.zip-npm-4.2.0-5299417ec8-e596da80a6.zip/node_modules/lodash.zip/index.js",
}
`)

expect(
resolver.resolve('@atlaskit/pragmatic-drag-and-drop/combine', testfile),
).toMatchInlineSnapshot(`
{
"found": true,
"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",
}
`)
})

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