don't eval tests if there is only a script tag

This commit is contained in:
rolux 2012-05-25 18:32:54 +02:00
parent eb9cd1e397
commit 8a7e0dff11

View file

@ -402,7 +402,9 @@ Ox.test = function(file, callback) {
Ox.doc(file, function(items) {
var tests = [];
items.forEach(function(item) {
item.examples && item.examples.forEach(function(example) {
item.examples.some(function(example) {
return example.result;
}) && item.examples.forEach(function(example) {
Ox.Log('TEST', example.statement);
var actual = eval(example.statement);
if (example.result) {