@pdtf/schemas 0.6.6 → 0.6.9
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.
|
@@ -81,6 +81,27 @@ test("correctly gets another subschema through an arrays element", () => {
|
|
|
81
81
|
expect(subschema.title).toBe("First name");
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
+
test("correctly gets a subschema through a dependency", () => {
|
|
85
|
+
const subschema = getSubschema(
|
|
86
|
+
"/propertyPack/materialFacts/delayFactors/hasDelayFactors/details"
|
|
87
|
+
);
|
|
88
|
+
expect(subschema.title).toBe("Details");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test("correctly gets another subschema through a dependency", () => {
|
|
92
|
+
const subschema = getSubschema(
|
|
93
|
+
"/propertyPack/materialFacts/ownership/leaseholdDetails/lengthOfLeaseInYears"
|
|
94
|
+
);
|
|
95
|
+
expect(subschema.title).toBe("Length of lease (years)");
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test("correctly gets yet another subschema through a dependency", () => {
|
|
99
|
+
const subschema = getSubschema(
|
|
100
|
+
"/propertyPack/materialFacts/ownership/leaseholdDetails/rentIncrease/details"
|
|
101
|
+
);
|
|
102
|
+
expect(subschema.title).toBe("Details");
|
|
103
|
+
});
|
|
104
|
+
|
|
84
105
|
test("correctly gets a subschema validator which is already cached", () => {
|
|
85
106
|
const validator = getSubschemaValidator(
|
|
86
107
|
"/propertyPack/energyPerformanceCertificate"
|