Skip to content

Commit 0933431

Browse files
committed
test(lock): remove timestamp field assertions
1 parent 921bcf2 commit 0933431

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

tests/edge-cases.test.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ test("lock file with invalid version", async () => {
222222

223223
const invalidLock = {
224224
version: 2,
225-
generatedAt: new Date().toISOString(),
226225
toolVersion: "0.1.0",
227226
sources: {},
228227
};
@@ -249,7 +248,7 @@ test("lock file with missing required fields", async () => {
249248

250249
const invalidLock = {
251250
version: 1,
252-
// missing generatedAt, toolVersion, sources
251+
// missing toolVersion, sources
253252
};
254253
await writeFile(lockPath, JSON.stringify(invalidLock, null, 2), "utf8");
255254

@@ -259,7 +258,7 @@ test("lock file with missing required fields", async () => {
259258
} = await import("node:fs/promises");
260259
const raw = await read(lockPath, "utf8");
261260
const parsed = JSON.parse(raw);
262-
assert.equal(parsed.generatedAt, undefined);
261+
assert.equal(parsed.toolVersion, undefined);
263262
});
264263

265264
test("lock file with negative bytes", async () => {
@@ -272,7 +271,6 @@ test("lock file with negative bytes", async () => {
272271

273272
const invalidLock = {
274273
version: 1,
275-
generatedAt: new Date().toISOString(),
276274
toolVersion: "0.1.0",
277275
sources: {
278276
test: {
@@ -282,7 +280,6 @@ test("lock file with negative bytes", async () => {
282280
bytes: -100,
283281
fileCount: 5,
284282
manifestSha256: "def456",
285-
updatedAt: new Date().toISOString(),
286283
},
287284
},
288285
};

tests/lock.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ test("writeLock produces readable JSON", async (t) => {
4747
};
4848
await module.writeLock(tmpPath, lock);
4949
const parsed = await module.readLock(tmpPath);
50-
assert.equal(parsed.toolVersion, lock.toolVersion);
50+
assert.deepEqual(parsed, lock);
5151
});

0 commit comments

Comments
 (0)