|
1 | | -const testData = require('./defaults.ct') |
| 1 | +const testData = require("./defaults.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('default single content block', () => { |
14 | | - const result = tsgen(testData.defaultSingleContentBlock) |
| 13 | +describe("default single content block", () => { |
| 14 | + const result = tsgen(testData.defaultSingleContentBlock); |
15 | 15 |
|
16 | | - test('definition', () => { |
| 16 | + test("definition", () => { |
17 | 17 | expect(result.definition).toMatchInlineSnapshot(` |
18 | 18 | "export interface IMetadataSingleContentBlock |
19 | 19 | { |
20 | 20 | /** Version */ |
21 | 21 | version: 2 ; |
22 | | - title: string; |
| 22 | + title: string ; |
23 | 23 | }" |
24 | | - `) |
25 | | - }) |
26 | | -}) |
| 24 | + `); |
| 25 | + }); |
| 26 | +}); |
27 | 27 |
|
28 | | -describe('default single webpage', () => { |
29 | | - const result = tsgen(testData.defaultSingleWebpage) |
| 28 | +describe("default single webpage", () => { |
| 29 | + const result = tsgen(testData.defaultSingleWebpage); |
30 | 30 |
|
31 | | - test('types', () => { |
32 | | - const types = result.metadata.types |
33 | | - expect([...types.contentstack]).toHaveLength(0) |
34 | | - expect([...types.globalFields]).toHaveLength(0) |
35 | | - expect(types.javascript).toContain('string') |
36 | | - }) |
| 31 | + test("types", () => { |
| 32 | + const types = result.metadata.types; |
| 33 | + expect([...types.contentstack]).toHaveLength(0); |
| 34 | + expect([...types.globalFields]).toHaveLength(0); |
| 35 | + expect(types.javascript).toContain("string"); |
| 36 | + }); |
37 | 37 |
|
38 | | - test('dependencies', () => { |
39 | | - expect(result.metadata.dependencies.globalFields).toEqual({}) |
40 | | - }) |
| 38 | + test("dependencies", () => { |
| 39 | + expect(result.metadata.dependencies.globalFields).toEqual({}); |
| 40 | + }); |
41 | 41 |
|
42 | | - test('definition', () => { |
| 42 | + test("definition", () => { |
43 | 43 | expect(result.definition).toMatchInlineSnapshot(` |
44 | 44 | "export interface IMetadataSingleWebpage |
45 | 45 | { |
46 | 46 | /** Version */ |
47 | 47 | version: 2 ; |
48 | | - title: string; |
49 | | - url: string; |
| 48 | + title: string ; |
| 49 | + url: string ; |
50 | 50 | }" |
51 | | - `) |
52 | | - }) |
53 | | -}) |
| 51 | + `); |
| 52 | + }); |
| 53 | +}); |
0 commit comments