Skip to content

Commit 6ee69dd

Browse files
CopilotLipata
andcommitted
Fix workspace directoryExists mock in Webcomponents test
Co-authored-by: Lipata <[email protected]>
1 parent f082ee3 commit 6ee69dd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

spec/unit/update-spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,10 @@ export default class App extends LitElement {
11751175
`
11761176
}];
11771177
(fsSpy.fileExists as jasmine.Spy).and.returnValue(true);
1178+
// Mock directoryExists to return true for workspace directories
1179+
(fsSpy.directoryExists as jasmine.Spy).and.callFake((dirPath: string) => {
1180+
return dirPath.includes("projectA") || dirPath.includes("projectB");
1181+
});
11781182
(fsSpy.glob as jasmine.Spy).and.returnValues // per workspace
11791183
([ "package.json" ], // root package.json
11801184
[], //index.html

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,11 @@
909909
resolved "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.3.2.tgz"
910910
integrity sha512-HhgHqOUT05H45zuQL+XPywQbRNFttd7Rkkr7dZnpCRdp4W8GDjfyKCoCS5qVyowAyNh9Vc7VEq9qmiLMlvf6Zg==
911911

912+
913+
version "20.3.2"
914+
resolved "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.3.2.tgz"
915+
integrity sha512-NrZ8L9of2GmYEM8GMJX6QRrLJlAwM+ds2rhdY1bxwpiyCNcD3IO/gzJlBs+kG4ly05F1u/X4k/FI5dXPpjUSgw==
916+
912917
"@octokit/auth-token@^3.0.0":
913918
version "3.0.4"
914919
resolved "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz"

0 commit comments

Comments
 (0)