Skip to content

Commit 9c7bf87

Browse files
committed
add tests to ensure deprecated roles are undefined
1 parent 4efc5ae commit 9c7bf87

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/jasmine/bundle_tests/plotschema_test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ describe('plot schema', function() {
7878
function(attr) {
7979
if(isValObject(attr)) {
8080
expect(deprecatedRoles.indexOf(attr.role) === -1).toBe(true, attr);
81+
expect(attr.role).toBeUndefined(attr);
8182
}
8283
}
8384
);
@@ -232,10 +233,10 @@ describe('plot schema', function() {
232233
Object.keys(attr[DEPRECATED]).forEach(function(dAttrName) {
233234
var dAttr = attr[DEPRECATED][dAttrName];
234235

235-
expect(VALTYPES.indexOf(dAttr.valType) !== -1)
236-
.toBe(true, attrString + ': ' + dAttrName);
237-
expect(deprecatedRoles.indexOf(dAttr.role) === -1)
238-
.toBe(true, attrString + ': ' + dAttrName);
236+
var msg = attrString + ': ' + dAttrName;
237+
expect(VALTYPES.indexOf(dAttr.valType) !== -1).toBe(true, msg);
238+
expect(deprecatedRoles.indexOf(dAttr.role) === -1).toBe(true, msg);
239+
expect(dAttr.role).toBeUndefined(msg);
239240
});
240241
}
241242
}

0 commit comments

Comments
 (0)