Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review: clearer assertions and naming in three test files

[._.]/ Adam Eivy5a4a427cba56
diff --git a/server/lib/identityValidation.test.js b/server/lib/identityValidation.test.js
index b648228ff8..25376f439a 100644
--- a/server/lib/identityValidation.test.js
+++ b/server/lib/identityValidation.test.js
@@ -269,7 +269,7 @@ describe('identityValidation', () => {
});
describe('updateProgressSchema', () => {
- it('clamps progress to 0..100', () => {
+ it('validates progress is within 0..100', () => {
expect(updateProgressSchema.safeParse({ value: 0 }).success).toBe(true);
expect(updateProgressSchema.safeParse({ value: 100 }).success).toBe(true);
expect(updateProgressSchema.safeParse({ value: -1 }).success).toBe(false);
diff --git a/server/lib/mediaItemKey.test.js b/server/lib/mediaItemKey.test.js
index 56ff82a6f7..7d0b1420ff 100644
--- a/server/lib/mediaItemKey.test.js
+++ b/server/lib/mediaItemKey.test.js
@@ -93,10 +93,10 @@ describe('mediaItemKey', () => {
});
it('round-trips through itemKey', () => {
- const it = { kind: 'video', ref: 'abc' };
- const key = itemKey(it);
+ const mediaItem = { kind: 'video', ref: 'abc' };
+ const key = itemKey(mediaItem);
expect(isValidKey(key)).toBe(true);
- expect(parseKey(key)).toEqual(it);
+ expect(parseKey(key)).toEqual(mediaItem);
});
});
});
diff --git a/server/lib/writersRoomStylePresets.test.js b/server/lib/writersRoomStylePresets.test.js
index 8452792288..31bd63d026 100644
--- a/server/lib/writersRoomStylePresets.test.js
+++ b/server/lib/writersRoomStylePresets.test.js
@@ -67,7 +67,7 @@ describe('writersRoomStylePresets', () => {
describe('getStylePresetById', () => {
it('returns the matching preset', () => {
const cinematic = getStylePresetById('cinematic');
- expect(cinematic).toBeDefined();
+ expect(cinematic).not.toBeNull();
expect(cinematic.id).toBe('cinematic');
expect(cinematic.label).toBe('Cinematic');
});
@@ -87,7 +87,7 @@ describe('writersRoomStylePresets', () => {
describe('findStylePreset', () => {
it('returns the matching preset', () => {
const noir = findStylePreset('noir');
- expect(noir).toBeDefined();
+ expect(noir).not.toBeNull();
expect(noir.id).toBe('noir');
});