Commit e0e40faa authored by Diegodlh's avatar Diegodlh
Browse files

duplicate template paths are silently ignored

parent bb444644
......@@ -251,12 +251,16 @@ describe("No applicable templates", () => {
});
});
it("rejects multiple templates for the same path", () => {
it("multiple templates for the same path are silently ignored", () => {
const duplicatePathTemplate: TemplateDefinition = {
...applicableTemplate,
};
const templates = [applicableTemplate, duplicatePathTemplate];
expect(() => {
new TemplateConfiguration(domain, [], undefined, templates);
}).toThrow("Multiple templates provided");
const configuration = new TemplateConfiguration(
domain,
[],
undefined,
templates
);
expect(configuration.get().length).toBe(1);
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment