|
1 | | -const testData = require('./references.ct') |
| 1 | +const testData = require("./references.ct"); |
2 | 2 |
|
3 | | -import NullDocumentationGenerator from '../../src/lib/tsgen/docgen/nulldoc' |
4 | | -import tsgenFactory from '../../src/lib/tsgen/factory' |
| 3 | +import NullDocumentationGenerator from "../../src/lib/tsgen/docgen/nulldoc"; |
| 4 | +import tsgenFactory from "../../src/lib/tsgen/factory"; |
5 | 5 |
|
6 | 6 | const tsgen = tsgenFactory({ |
7 | 7 | docgen: new NullDocumentationGenerator(), |
8 | 8 | naming: { |
9 | | - prefix: 'I', |
| 9 | + prefix: "I", |
10 | 10 | }, |
11 | | -}) |
| 11 | +}); |
12 | 12 |
|
13 | | -describe('references', () => { |
14 | | - const result = tsgen(testData.references) |
| 13 | +describe("references", () => { |
| 14 | + const result = tsgen(testData.references); |
15 | 15 |
|
16 | | - test('metadata', () => { |
17 | | - const contentTypes = [...result.metadata.dependencies.contentTypes] |
| 16 | + test("metadata", () => { |
| 17 | + const contentTypes = [...result.metadata.dependencies.contentTypes]; |
18 | 18 |
|
19 | 19 | expect(contentTypes).toEqual( |
20 | | - expect.arrayContaining(['IReferenceChild', 'IBoolean', 'IBuiltinExample']) |
21 | | - ) |
22 | | - }) |
| 20 | + expect.arrayContaining(["IReferenceChild", "IBoolean", "IBuiltinExample"]) |
| 21 | + ); |
| 22 | + }); |
23 | 23 |
|
24 | | - test('definition', () => { |
| 24 | + test("definition", () => { |
25 | 25 | expect(result.definition).toMatchInlineSnapshot(` |
26 | 26 | "export interface IReferenceParent |
27 | 27 | { |
28 | 28 | /** Version */ |
29 | 29 | version: 5 ; |
30 | 30 | title: string; |
31 | 31 | url: string; |
32 | | - single_reference: (IReferenceChild)[]; |
| 32 | + single_reference: (IReferenceChild); |
33 | 33 | multiple_reference?: (IReferenceChild | IBoolean | IBuiltinExample)[]; |
34 | 34 | }" |
35 | | - `) |
36 | | - }) |
37 | | -}) |
| 35 | + `); |
| 36 | + }); |
| 37 | +}); |
0 commit comments