Skip to content

Commit 294e6d3

Browse files
Copilothotlong
andcommitted
Fix test assertions and improve test documentation based on code review
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent fdd7325 commit 294e6d3

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

packages/drivers/redis/test/index.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,11 @@ describe('RedisDriver', () => {
645645
value: 'user'
646646
});
647647

648-
expect(departments).toHaveLength(2);
648+
// Eve (user, IT), Bob (user, HR), David (user, Sales)
649+
expect(departments).toHaveLength(3);
649650
expect(departments).toContain('HR');
650651
expect(departments).toContain('Sales');
651-
expect(departments).not.toContain('IT'); // Admins are in IT, not users
652+
expect(departments).toContain('IT'); // Eve is a user in IT
652653
});
653654

654655
it('should handle distinct on numeric fields', async () => {

packages/protocols/graphql/src/integration.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,14 @@ describe('GraphQL Protocol Integration Tests', () => {
144144
describe('Apollo Server Startup', () => {
145145
it('should start Apollo Server successfully', () => {
146146
expect(plugin).toBeDefined();
147+
// Note: Full HTTP endpoint testing would require supertest
148+
// For now, we verify the plugin initialized successfully
147149
});
148150

149-
it('should expose GraphQL endpoint', async () => {
150-
// Note: This is a basic check - full HTTP testing would require supertest
151+
it('should be accessible at configured port', () => {
152+
// Verify base URL is configured correctly
151153
expect(baseUrl).toBe('http://localhost:14000');
154+
// Note: Actual HTTP request verification would require supertest
152155
});
153156
});
154157

packages/protocols/odata-v4/src/integration.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,18 @@ describe('OData V4 Protocol Integration Tests', () => {
115115
});
116116

117117
describe('OData V4 Standard Endpoints', () => {
118-
it('should support service document endpoint', () => {
118+
it('should initialize plugin successfully', () => {
119119
expect(plugin).toBeDefined();
120+
// Note: Actual HTTP endpoint testing would require supertest
121+
// For now, we verify the plugin initialized correctly
120122
});
121123

122-
it('should support metadata endpoint', () => {
124+
it('should provide metadata access', () => {
123125
const objects = kernel.metadata.list('object');
124126
expect(objects).toBeDefined();
125127
expect(objects.length).toBeGreaterThan(0);
128+
// Verifies metadata is accessible - actual $metadata endpoint
129+
// would require HTTP testing with supertest
126130
});
127131
});
128132

0 commit comments

Comments
 (0)