You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: __tests__/api-writer/glua-api-writer.spec.ts
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -297,6 +297,28 @@ describe('GLua API Writer', () => {
297
297
expect(api).toEqual(`---[SHARED] Just for testing.\n---\n---[(View on wiki)](na)\n---@param value table<string|number>|string The value to fake.\nfunction test.Fake(value) end\n\n`);
298
298
});
299
299
300
+
it('should support structure table type',()=>{
301
+
constwriter=newGluaApiWriter();
302
+
constapi=writer.writePage(<LibraryFunction>{
303
+
name: 'ToScreen',
304
+
address: 'Vector.ToScreen',
305
+
parent: 'Vector',
306
+
dontDefineParent: true,
307
+
description: 'Returns where on the screen the specified position vector would appear.',
308
+
realm: 'Client',
309
+
type: 'libraryfunc',
310
+
url: 'na',
311
+
returns: [
312
+
{
313
+
type: 'table{ToScreenData}',
314
+
description: 'The created Structures/ToScreenData.',
315
+
},
316
+
],
317
+
});
318
+
319
+
expect(api).toEqual(`---[CLIENT] Returns where on the screen the specified position vector would appear.\n---\n---[(View on wiki)](na)\n---@return ToScreenData # The created Structures/ToScreenData.\nfunction Vector.ToScreen() end\n\n`);
320
+
});
321
+
300
322
// it('should be able to write Annotated API files directly from wiki pages', async () => {
0 commit comments