test: harden package boundaries and audit budgets
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/syntax",
|
||||
"version": "0.8.15",
|
||||
"version": "0.8.16",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -26,3 +26,10 @@ test("api entries normalize methods and reject malformed request fields", () =>
|
||||
parseApiSections("request { body { missingType } } response { return data }"),
|
||||
).toThrow('Expected "name: type"');
|
||||
});
|
||||
|
||||
test("api entries reject truncated blocks and bare response bodies", () => {
|
||||
expect(() => parseApiEntries("lookup GET /users { response { return data }")).toThrow();
|
||||
expect(() => parseApiEntries("lookup GET /users { return data }")).toThrow(
|
||||
'declare a "response { }" section',
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user