@lblod/lib-decision-shapes 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.woodpecker/.feature.yml +14 -0
- package/.woodpecker/.latest.yml +14 -0
- package/.woodpecker/.tag.yml +14 -0
- package/.woodpecker/.verify-pr.yml +15 -0
- package/LICENSE +21 -0
- package/README.md +17 -0
- package/dist/examples/examples/basic-agenda.ts +122 -0
- package/dist/examples/examples/decision-list.ts +243 -0
- package/dist/examples/examples/notulen.ts +702 -0
- package/dist/index.js +2625 -0
- package/dist/index.js.map +1 -0
- package/dist/shapes/shapes/basic-agenda.ts +249 -0
- package/dist/shapes/shapes/decision-list.ts +469 -0
- package/dist/shapes/shapes/notulen.ts +757 -0
- package/jest.config.js +5 -0
- package/package.json +49 -0
- package/src/examples/basic-agenda.ts +122 -0
- package/src/examples/decision-list.ts +243 -0
- package/src/examples/notulen.ts +702 -0
- package/src/index.ts +53 -0
- package/src/shapes/basic-agenda.ts +249 -0
- package/src/shapes/decision-list.ts +469 -0
- package/src/shapes/notulen.ts +757 -0
- package/test/index.test.ts +62 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { getHTMLExampleOfDocumentType, getShapeOfDocumentType } from '../src';
|
|
2
|
+
|
|
3
|
+
import { basicAgendaShape } from '../src/shapes/basic-agenda';
|
|
4
|
+
import { decisionListShape } from '../src/shapes/decision-list';
|
|
5
|
+
import { notulenShape } from '../src/shapes/notulen';
|
|
6
|
+
|
|
7
|
+
import { basicAgendaExample } from '../src/examples/basic-agenda';
|
|
8
|
+
import { decisionListExample } from '../src/examples/decision-list';
|
|
9
|
+
import { notulenExample } from '../src/examples/notulen';
|
|
10
|
+
|
|
11
|
+
describe('I want the tool to return a shape per document type (notulen, besluitenlijst, agenda)', () => {
|
|
12
|
+
test('retrieving document type Notulen returns expected SHACL', async () => {
|
|
13
|
+
const DOCUMENT_TYPE = 'Notulen';
|
|
14
|
+
const expected: string = notulenShape;
|
|
15
|
+
const actual: string = getShapeOfDocumentType(DOCUMENT_TYPE);
|
|
16
|
+
|
|
17
|
+
expect(actual).toBe(expected);
|
|
18
|
+
expect(typeof actual).toBe('string');
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('retrieving document type Besluitenlijst returns expected SHACL', async () => {
|
|
22
|
+
const DOCUMENT_TYPE = 'Besluitenlijst';
|
|
23
|
+
const expected = decisionListShape;
|
|
24
|
+
const actual = getShapeOfDocumentType(DOCUMENT_TYPE);
|
|
25
|
+
|
|
26
|
+
expect(actual).toBe(expected);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test('retrieving document type Agenda returns expected SHACL', async () => {
|
|
30
|
+
const DOCUMENT_TYPE = 'Agenda';
|
|
31
|
+
const expected = basicAgendaShape;
|
|
32
|
+
const actual = getShapeOfDocumentType(DOCUMENT_TYPE);
|
|
33
|
+
|
|
34
|
+
expect(actual).toBe(expected);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
describe('I want the tool to return an HTML example per document type (notulen, besluitenlijst, agenda)', () => {
|
|
39
|
+
test('retrieving document type Notulen returns expected example', async () => {
|
|
40
|
+
const DOCUMENT_TYPE = 'Notulen';
|
|
41
|
+
const expected = notulenExample;
|
|
42
|
+
const actual = getHTMLExampleOfDocumentType(DOCUMENT_TYPE);
|
|
43
|
+
|
|
44
|
+
expect(actual).toBe(expected);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test('retrieving document type Besluitenlijst returns expected example', async () => {
|
|
48
|
+
const DOCUMENT_TYPE = 'Besluitenlijst';
|
|
49
|
+
const expected = decisionListExample;
|
|
50
|
+
const actual = getHTMLExampleOfDocumentType(DOCUMENT_TYPE);
|
|
51
|
+
|
|
52
|
+
expect(actual).toBe(expected);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test('retrieving document type Agenda returns expected example', async () => {
|
|
56
|
+
const DOCUMENT_TYPE = 'Agenda';
|
|
57
|
+
const expected = basicAgendaExample;
|
|
58
|
+
const actual = getHTMLExampleOfDocumentType(DOCUMENT_TYPE);
|
|
59
|
+
|
|
60
|
+
expect(actual).toBe(expected);
|
|
61
|
+
});
|
|
62
|
+
});
|
package/tsconfig.json
ADDED