Skip to content

Commit

Permalink
fix: Fix package test. (#85)
Browse files Browse the repository at this point in the history
Fix package test for create-gensx
  • Loading branch information
jmoseley authored Jan 7, 2025
1 parent d38be04 commit 93f439f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/create-gensx/tests/package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ afterEach(async () => {
await fs.remove(tempDir);
});

// This tests mimics the behavior of npm create by copying the built package to a temp directory and calling the cli command there.
it("package.json is correctly configured for npm create", async () => {
// Copy the built package to temp directory
const pkgDir = path.join(tempDir, "create-gensx");
Expand All @@ -41,6 +42,7 @@ it("package.json is correctly configured for npm create", async () => {
await exec(
`node "${path.join(pkgDir, "dist/cli.js")}" "${testProjectDir}"`,
{
cwd: pkgDir,
env: { ...process.env },
},
);
Expand Down

0 comments on commit 93f439f

Please sign in to comment.