Skip to content

Commit

Permalink
chore: use mocked package in test (#9475)
Browse files Browse the repository at this point in the history
### Description

Use a mocked `@types` package instead of a real one in test so we don't
hit the npm registry.

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->
  • Loading branch information
NicholasLYang authored Nov 21, 2024
1 parent ac4435a commit 82ae03c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@ expression: query_output
{
"path": "apps/my-app/types.ts"
},
{
"path": "node_modules/@types/d3-scale/index.d.ts"
},
{
"path": "node_modules/@types/d3-time/index.d.ts"
},
{
"path": "packages/another/index.jsx"
},
{
"path": "packages/module-package/my-module.mjs"
},
{
"path": "packages/ship-types/index.ts"
},
{
"path": "packages/utils/index.ts"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import ship from "utils";
import { blackbeard } from "../../packages/another/index.jsx";
import { Pirate } from "@/types.ts";
import { walkThePlank } from "module-package";
import type { ScalePoint } from "d3-scale";
import type { Ship } from "ship";
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
},
"dependencies": {
"utils": "*",
"@types/d3-scale": "^4.0.2"
"@types/ship": "*"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type Ship = "pirate" | "privateer" | "corvette";
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@types/ship",
"types": "index.ts"
}

0 comments on commit 82ae03c

Please sign in to comment.