Patch test text for non conforming tests

pull/4884/head
Berkeley Martinez 2015-12-02 13:04:50 -08:00
parent 4c3889d639
commit 8ec4720345
1 changed files with 5 additions and 4 deletions

View File

@ -53,11 +53,12 @@ window.$(document).ready(function() {
userTest.err = e.message.split(':').shift();
} finally {
if (!test.match(/message: /g)) {
userTest.text = 'message: ' + test
// assumes test does not contain arrays
// This is a patch until all test fall into this pattern
userTest.text = test
.split(',')
.pop()
.replace(/\'/g, '')
.replace(/\)/, '');
.pop();
userTest.text = 'message: ' + userTest.text + '\');';
} else {
userTest.text = test;
}