String markup = "<aura:clientLibrary name='urlAndTypeMismatch' url='js://clientLibraryTest.clientLibraryTest' type='CSS'/>";
DefDescriptor<ComponentDef> cmp = addSourceAutoCleanup(ComponentDef.class,
String.format(baseComponentTag, "", markup));
try {
ComponentDef def = cmp.getDef();
def.validateDefinition();
fail("Should flag an error when resource type and specified type attribute do not match.");
} catch (InvalidDefinitionException e) {
assertEquals("ResourceDef type must match library type", e.getMessage());
}
}