Skip to content

Commit

Permalink
try to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
echo-bravo-yahoo committed Nov 21, 2024
1 parent 777189c commit 9e3531c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions scripts/update-prod-hashbang.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node
import * as fs from "node:fs";
import * as fsp from "node:fs/promises";
import * as path from "node:path";

const __dirname = import.meta.dirname;
Expand All @@ -12,4 +13,8 @@ fileContents = `#!/usr/bin/env NODE_NO_WARNINGS=1 node\n${fileContents}`;
fs.rmSync(filePath);
fs.writeFileSync(filePath, fileContents, {
mode: 0o755,
flush: true,
});

// eslint-disable-next-line no-console
fsp.stat(filePath).then(console.log);
4 changes: 0 additions & 4 deletions test/general-cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ describe("cli operations", function () {
it("enables nodeJS warnings from the dev entrypoint", async function () {
let stderr = spawnSync("./src/user-entrypoint.mjs", ["warn"], {
encoding: "utf8",
shell: true,
stdio: "pipe",
}).stderr;

// the dev script should emit warnings
Expand All @@ -141,8 +139,6 @@ describe("cli operations", function () {
it("suppresses nodeJS warnings from the prod entrypoint", async function () {
let stderr = spawnSync("./dist/cli.cjs", ["warn"], {
encoding: "utf8",
shell: true,
stdio: "pipe",
}).stderr;

// the prod one should not
Expand Down

0 comments on commit 9e3531c

Please sign in to comment.