if test does not error (as expected) then assert false instead of hanging

This commit is contained in:
Dane Springmeyer 2014-09-23 14:22:59 -07:00
parent 481a0fc406
commit 51baca34ae

View File

@ -20,6 +20,9 @@ helper.files('errorhandling', 'mml', function(file) {
local_data_dir: path.join(__dirname, 'rendering'), local_data_dir: path.join(__dirname, 'rendering'),
filename: file filename: file
}).render(mml); }).render(mml);
// should not get here
assert.ok(false);
done();
} catch(err) { } catch(err) {
if (err.message.indexOf('***') > -1) throw err; if (err.message.indexOf('***') > -1) throw err;
var result = helper.resultFile(file); var result = helper.resultFile(file);
@ -54,6 +57,9 @@ helper.files('errorhandling', 'mss', function(file) {
// will match if the style was loaded from mml // will match if the style was loaded from mml
filename: basename filename: basename
}).renderMSS(mss); }).renderMSS(mss);
// should not get here
assert.ok(false);
done();
} catch(err) { } catch(err) {
if (err.message.indexOf('***') > -1) throw err; if (err.message.indexOf('***') > -1) throw err;
var result = helper.resultFile(file); var result = helper.resultFile(file);