@yuneta/gobj-ui 7.29.3 → 7.29.4
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/package.json
CHANGED
|
@@ -222,9 +222,9 @@ test("normalize_spec accepts its own output (every level re-normalizes)", () =>
|
|
|
222
222
|
***************************************************************/
|
|
223
223
|
test("aliases carry the former ids of a node", () => {
|
|
224
224
|
let errors = [];
|
|
225
|
-
let spec = normalize_spec({id: "north", aliases: ["
|
|
225
|
+
let spec = normalize_spec({id: "north", aliases: ["building1", "b1"]}, errors, "/");
|
|
226
226
|
expect(errors).toEqual([]);
|
|
227
|
-
expect(spec.aliases).toEqual(["
|
|
227
|
+
expect(spec.aliases).toEqual(["building1", "b1"]);
|
|
228
228
|
expect(normalize_spec({id: "x"}, errors, "/").aliases).toEqual([]);
|
|
229
229
|
});
|
|
230
230
|
|
|
@@ -234,7 +234,7 @@ test("an alias is one url segment, like an id", () => {
|
|
|
234
234
|
expect(errors[0]).toMatch(/is not a valid id/);
|
|
235
235
|
|
|
236
236
|
errors = [];
|
|
237
|
-
expect(normalize_spec({id: "x", aliases: "
|
|
237
|
+
expect(normalize_spec({id: "x", aliases: "building1"}, errors, "/")).toBe(null);
|
|
238
238
|
expect(errors[0]).toMatch(/'aliases' must be an array/);
|
|
239
239
|
});
|
|
240
240
|
|