From c56b7cc9edef9c4f8e794dd1c777043e7e265af7 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 25 May 2012 19:28:17 +0200 Subject: [PATCH] fix a bug in Ox.test --- source/Ox/js/JavaScript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Ox/js/JavaScript.js b/source/Ox/js/JavaScript.js index 205caa29..d0d813b3 100644 --- a/source/Ox/js/JavaScript.js +++ b/source/Ox/js/JavaScript.js @@ -402,7 +402,7 @@ Ox.test = function(file, callback) { Ox.doc(file, function(items) { var tests = []; items.forEach(function(item) { - item.examples.some(function(example) { + item.examples && item.examples.some(function(example) { return example.result; }) && item.examples.forEach(function(example) { Ox.Log('TEST', example.statement);