Skip to content

Commit

Permalink
all remaining PA examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Sep 18, 2024
1 parent 834f4a4 commit 5ccaad1
Show file tree
Hide file tree
Showing 15 changed files with 20,023 additions and 1 deletion.
672 changes: 672 additions & 0 deletions examples/prototypeApplication/data/landDrainageConsent.ts

Large diffs are not rendered by default.

1,116 changes: 1,116 additions & 0 deletions examples/prototypeApplication/data/listedBuildingConsent.ts

Large diffs are not rendered by default.

1,758 changes: 1,758 additions & 0 deletions examples/prototypeApplication/data/priorApproval/buildHomes.ts

Large diffs are not rendered by default.

1,531 changes: 1,531 additions & 0 deletions examples/prototypeApplication/data/priorApproval/convertCommercialToHome.ts

Large diffs are not rendered by default.

1,731 changes: 1,731 additions & 0 deletions examples/prototypeApplication/data/priorApproval/extendUniversity.ts

Large diffs are not rendered by default.

1,500 changes: 1,500 additions & 0 deletions examples/prototypeApplication/data/priorApproval/largerExtension.ts

Large diffs are not rendered by default.

1,306 changes: 1,306 additions & 0 deletions examples/prototypeApplication/data/priorApproval/solarPanels.ts

Large diffs are not rendered by default.

1,063 changes: 1,063 additions & 0 deletions examples/prototypeApplication/landDrainageConsent.json

Large diffs are not rendered by default.

1,126 changes: 1,126 additions & 0 deletions examples/prototypeApplication/listedBuildingConsent.json

Large diffs are not rendered by default.

1,832 changes: 1,832 additions & 0 deletions examples/prototypeApplication/priorApproval/buildHomes.json

Large diffs are not rendered by default.

1,594 changes: 1,594 additions & 0 deletions examples/prototypeApplication/priorApproval/convertCommercialToHome.json

Large diffs are not rendered by default.

1,757 changes: 1,757 additions & 0 deletions examples/prototypeApplication/priorApproval/extendUniversity.json

Large diffs are not rendered by default.

1,534 changes: 1,534 additions & 0 deletions examples/prototypeApplication/priorApproval/largerExtension.json

Large diffs are not rendered by default.

1,492 changes: 1,492 additions & 0 deletions examples/prototypeApplication/priorApproval/solarPanels.json

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion tests/usage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import * as path from 'path';
import Ajv from 'ajv';
import addFormats from 'ajv-formats';
import {Schema, Validator} from 'jsonschema';
import {describe, expect, test} from 'vitest';
import applicationSchema from '../schemas/application.json';
import prototypeApplicationSchema from '../schemas/prototypeApplication.json';
import {Application} from '../types/schemas/application';
import {describe, test, expect} from 'vitest';
import {PrototypeApplication} from '../types/schemas/prototypeApplication';

/**
* Helper function to walk /examples directory and collect generated JSON files
Expand Down Expand Up @@ -41,11 +43,19 @@ const schemas = [
schema: applicationSchema,
examples: getJSONExamples<Application>('application'),
},
// {
// name: 'PrototypeApplication',
// schema: prototypeApplicationSchema,
// examples: getJSONExamples<PrototypeApplication>('prototypeApplication'),
// },
];

describe.each(schemas)('$name', ({schema, examples}) => {
const validator = new Validator();

const _applicationTypeProperty =
'$data.application.type.description' || '$applicationType';

describe("parsing using the 'jsonschema' library", () => {
describe.each(examples)('$data.application.type.description', example => {
test('accepts a valid example', async () => {
Expand Down

0 comments on commit 5ccaad1

Please sign in to comment.