Throw message for ValidationExceptions
This commit is contained in:
committed by
Jonathan Putney
parent
7b92c65061
commit
67bf600c52
@@ -45,7 +45,7 @@ export const checkLMSSetValue = (
|
||||
if (expectedError > 0) {
|
||||
if (errorThrown) {
|
||||
expect(() => api.lmsSetValue(fieldName, valueToTest)).
|
||||
to.throw(String(expectedError));
|
||||
to.throw().with.property('errorCode', expectedError);
|
||||
} else {
|
||||
api.lmsSetValue(fieldName, valueToTest);
|
||||
expect(String(api.lmsGetLastError())).to.equal(String(expectedError));
|
||||
@@ -84,7 +84,7 @@ export const checkLMSGetValue = (
|
||||
if (expectedError > 0) {
|
||||
if (errorThrown) {
|
||||
expect(() => api.lmsGetValue(fieldName)).
|
||||
to.throw(String(expectedError));
|
||||
to.throw().with.property('errorCode', expectedError);
|
||||
} else {
|
||||
api.lmsGetValue(fieldName);
|
||||
expect(String(api.lmsGetLastError())).to.equal(String(expectedError));
|
||||
@@ -110,7 +110,7 @@ export const checkSetCMIValue = (
|
||||
if (expectedError > 0) {
|
||||
if (errorThrown) {
|
||||
expect(() => api.setCMIValue(fieldName, valueToTest)).
|
||||
to.throw(String(expectedError));
|
||||
to.throw().with.property('errorCode', expectedError);
|
||||
} else {
|
||||
api.setCMIValue(fieldName, valueToTest);
|
||||
expect(String(api.lmsGetLastError())).to.equal(String(expectedError));
|
||||
|
||||
Reference in New Issue
Block a user