Skip to content

Commit

Permalink
Adding more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasLYang committed Nov 20, 2024
1 parent 63e7e3d commit 89422fc
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/turborepo/tests/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn test_trace_on_monorepo() -> Result<(), anyhow::Error> {
"query",
"get `apps/my-app/index.ts` with dependencies" => "query { file(path: \"apps/my-app/index.ts\") { path dependencies { files { items { path } } errors { items { message } } } } }",
"get `packages/utils/index.ts` with dependents" => "query { file(path: \"packages/utils/index.ts\") { path dependents { files { items { path } } errors { items { message } } } } }",
"get `packages/another/index.js` with dependents" => "query { file(path: \"packages/another/index.js\") { path dependents { files { items { path } } errors { items { message } } } } }",
"get `packages/another/index.js` with dependents" => "query { file(path: \"packages/another/index.jsx\") { path dependents { files { items { path } } errors { items { message } } } } }",
);

Ok(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ expression: query_output
"path": "apps/my-app/types.ts"
},
{
"path": "packages/another/index.js"
"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/utils/index.ts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ expression: query_output
{
"data": {
"file": {
"path": "packages/another/index.js",
"path": "packages/another/index.jsx",
"dependents": {
"files": {
"items": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ expression: query_output
"path": "apps/my-app/index.ts"
},
{
"path": "packages/another/index.js"
"path": "packages/another/index.jsx"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { useMyHook } from "utils/my-hook";
import ship from "utils";
import { blackbeard } from "../../packages/another/index.js";
import { blackbeard } from "../../packages/another/index.jsx";
import { Pirate } from "@/types.ts";
import { walkThePlank } from "module-package";
import type { ScalePoint } from "d3-scale";
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"maybefails": "exit 4"
},
"dependencies": {
"utils": "*"
"utils": "*",
"@types/d3-scale": "^4.0.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { blackbeard } from "@/../../packages/another/index.js";
import { blackbeard } from "@/../../packages/another/index.jsx";

export interface Pirate {
ship: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const walkThePlank = "walk the plank matey";
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "module-package",
"module": "my-module.mjs"
}

0 comments on commit 89422fc

Please sign in to comment.