Patch assert messages without message: format

This commit is contained in:
Berkeley Martinez
2015-12-01 23:24:03 -08:00
parent 636824aba3
commit 8cad219082

View File

@ -51,11 +51,15 @@ window.$(document).ready(function() {
} catch (e) {
userTest.err = e.message.split(':').shift();
} finally {
userTest.text = test
.split(',')
.pop()
.replace(/\'/g, '')
.replace(/\)/, '');
if (!test.match(/message: /g)) {
userTest.text = 'message: ' + test
.split(',')
.pop()
.replace(/\'/g, '')
.replace(/\)/, '');
} else {
userTest.text = test;
}
}
return userTest;
})