From 55a4b3938dec37e26e77a28bde6646f6600ad4e3 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Thu, 22 Feb 2024 11:36:41 +0100 Subject: [PATCH] chore: test npmrc existance --- test/commands.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/commands.test.ts b/test/commands.test.ts index b86fc48..e3877d0 100644 --- a/test/commands.test.ts +++ b/test/commands.test.ts @@ -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"; @@ -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" + ); }); });