Skip to content

Commit 2f67c76

Browse files
Copilothotlong
andcommitted
Fix runtime/server tests by adding missing app.init() calls
Added await app.init() to test setup in: - node.test.ts - rest.test.ts - graphql.test.ts - rest-advanced.test.ts These tests were failing because ObjectQL v4.0 requires initialization before use. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 0b8bc17 commit 2f67c76

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

packages/runtime/server/test/graphql.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ describe('GraphQL API Adapter', () => {
146146
}
147147
}
148148
});
149+
150+
await app.init();
149151

150152
// Create handler and server once for all tests
151153
handler = createGraphQLHandler(app);

packages/runtime/server/test/node.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ describe('Node Adapter', () => {
5151
}
5252
}
5353
});
54+
55+
await app.init();
5456
});
5557

5658
it('should handle find request', async () => {

packages/runtime/server/test/rest-advanced.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ describe('REST API Error Handling & Edge Cases', () => {
133133
}
134134
}
135135
});
136+
137+
await app.init();
136138

137139
handler = createRESTHandler(app);
138140
server = createServer(handler);

packages/runtime/server/test/rest.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ describe('REST API Adapter', () => {
201201
}
202202
}
203203
});
204+
205+
await app.init();
204206

205207
// Create handler and server once for all tests
206208
handler = createRESTHandler(app);

0 commit comments

Comments
 (0)