Skip to content

Commit

Permalink
chore: test npmrc existance
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Feb 22, 2024
1 parent d7fc8c1 commit 55a4b39
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/commands.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as path from "path";
import * as fs from "fs";
import { isDirectory, isFile, runJsr, withTempEnv } from "./test_utils";
import * as assert from "node:assert/strict";

Expand All @@ -18,6 +19,13 @@ describe("install", () => {

const depPath = path.join(dir, "node_modules", "@std", "encoding");
assert.ok(await isDirectory(depPath), "Not installed in node_modules");

const npmrcPath = path.join(dir, ".npmrc");
const npmRc = await fs.promises.readFile(npmrcPath, "utf-8");
assert.ok(
npmRc.includes("@jsr:registry=https://npm.jsr.io"),
"Missing npmrc registry"
);
});
});

Expand Down

0 comments on commit 55a4b39

Please sign in to comment.