fix(test): narrow npm resolution timestamp

This commit is contained in:
Vincent Koc
2026-07-13 21:24:22 +02:00
parent bad37249f5
commit 343334951d
+5 -1
View File
@@ -115,7 +115,11 @@ describe("installFromNpmSpecArchiveWithInstaller", () => {
const okResult = expectWrappedOkResult(result, { ok: true, target: "done" });
expect(okResult.integrityDrift).toBeUndefined();
expect(okResult.npmResolution.resolvedSpec).toBe(baseSpec);
expect(Date.parse(okResult.npmResolution.resolvedAt)).not.toBeNaN();
const resolvedAt = okResult.npmResolution.resolvedAt;
if (!resolvedAt) {
throw new Error("expected npm resolution timestamp");
}
expect(Date.parse(resolvedAt)).not.toBeNaN();
expect(installFromArchive).toHaveBeenCalledWith({ archivePath: baseArchivePath });
});