Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-03-06 11:41:21 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-03-06 11:41:21 -0500
commit0d169ea9ebc35653805228e8af3cc3966ac93e05 (patch)
treec8064f64ad3ff73fed0fdc657b8e65411d415eb6 /progtest/src
parent0cb43d5e8a044db73bb13698137c444c05b8fd47 (diff)
downloadtame-0d169ea9ebc35653805228e8af3cc3966ac93e05.tar.gz
tame-0d169ea9ebc35653805228e8af3cc3966ac93e05.tar.bz2
tame-0d169ea9ebc35653805228e8af3cc3966ac93e05.zip
progtest: Return empty array of test cases if none providedv2.11.1
* progtest/src/reader/YamlTestReader.js (loadCases): Handle absence of any test cases. * progtest/test/reader/YamlTestReaderTest.js: New respective test.
Diffstat (limited to 'progtest/src')
-rw-r--r--progtest/src/reader/YamlTestReader.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/progtest/src/reader/YamlTestReader.js b/progtest/src/reader/YamlTestReader.js
index a28c1f3..dc0ef3b 100644
--- a/progtest/src/reader/YamlTestReader.js
+++ b/progtest/src/reader/YamlTestReader.js
@@ -71,7 +71,7 @@ module.exports = Class( 'YamlTestReader' )
*/
'virtual public loadCases'( yaml )
{
- const data = this._yamlParser.safeLoad( yaml )
+ const data = ( this._yamlParser.safeLoad( yaml ) || [] )
.map( this._createTestCase );
return data;