Addnew sheets (armor, weapons, malefica) and v13 support

This commit is contained in:
2025-05-18 23:51:26 +02:00
parent 7672f861ff
commit 995d61e1c6
4478 changed files with 667857 additions and 620 deletions

View File

@@ -0,0 +1,49 @@
const { parse, inspect } = require('../../lib/index.cjs');
const source = `
/**
* Typedef with multi-line property type.
*
* @typedef {object} MyType
* @property {function(
* number,
* {x:string}
* )} numberEater Method
* which takes a number.
*/`;
test('default', () => {
const parsed = parse(source);
// console.log(inspect(parsed[0]));
expect(parsed[0].tags[1]).toMatchObject({
tag: 'property',
type: 'function(number,{x:string})',
name: 'numberEater',
description: 'Method which takes a number.',
problems: [],
});
});
test('preserve', () => {
const parsed = parse(source, { spacing: 'preserve' });
// console.log(inspect(parsed[0]));
expect(parsed[0].tags[1]).toMatchObject({
tag: 'property',
type: 'function(\n number,\n {x:string}\n)',
name: 'numberEater',
description: 'Method\n which takes a number.',
problems: [],
});
});
test('compact', () => {
const parsed = parse(source, { spacing: 'compact' });
// console.log(inspect(parsed[0]));
expect(parsed[0].tags[1]).toMatchObject({
tag: 'property',
type: 'function(number,{x:string})',
name: 'numberEater',
description: 'Method which takes a number.',
problems: [],
});
});