You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore(*): improve code coverage
Signed-off-by: Matt Roberts <[email protected]>
* test(analysis): improve code coverage
Signed-off-by: Matt Roberts <[email protected]>
* test(core): add unit tests for modelfile
Signed-off-by: Matt Roberts <[email protected]>
Signed-off-by: Matt Roberts <[email protected]>
message: `The ${aType} "${a.getName()}" in the ${classDeclarationType} "${a.getParent().getName()}" changed type from "${aFQTN}" to "${bFQTN}" (type namespace differs)`,
147
-
element: a
148
-
});
149
-
return;
150
143
}
144
+
// Removing until we support type aliasing. Until then it's not possible to have an empty namespace
145
+
// (i.e. a primitive type) and to have the namespace change between versions
146
+
// else if (!aTypeFullNamespace || !bTypeFullNamespace) {
147
+
// context.report({
148
+
// key: 'property-type-changed',
149
+
// message: `The ${aType} "${a.getName()}" in the ${classDeclarationType} "${a.getParent().getName()}" changed type from "${aFQTN}" to "${bFQTN}" (type namespace differs)`,
message: `The ${aType} "${a.getName()}" in the ${classDeclarationType} "${a.getParent().getName()}" changed type from "${aFQTN}" to "${bFQTN}" (type version incompatible)`,
167
-
element: a
168
-
});
169
-
return;
170
-
}
164
+
// Removing until the Compare.compare function supports a non-strict modelManager
165
+
// if (!aTypeVersion && !bTypeVersion) {
166
+
// return;
167
+
// } else if (!aTypeVersion || !bTypeVersion) {
168
+
// context.report({
169
+
// key: 'property-type-changed',
170
+
// message: `The ${aType} "${a.getName()}" in the ${classDeclarationType} "${a.getParent().getName()}" changed type from "${aFQTN}" to "${bFQTN}" (type version incompatible)`,
test('should throw for unknown class declaration type',()=>{
22
+
expect(()=>getClassDeclarationType(classDeclaration)).toThrow('unknown class declaration type "ClassDeclaration {[email protected] super=Concept enum=false abstract=false}"');
23
+
});
24
+
25
+
test('should throw for unknown class property type',()=>{
26
+
expect(()=>getPropertyType(property)).toThrow('unknown property type "[object Object]');
27
+
});
28
+
29
+
test('should throw for unknown validator type',()=>{
30
+
expect(()=>getValidatorType(validator)).toThrow('unknown validator type "[object Object]');
0 commit comments