From 6a2ac97becc8c40fcd4d808aefd0ef05a8396577 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 27 May 2012 16:52:48 +0200 Subject: [PATCH] in Ox.test, allow for async tests; in Ox.doc, rename the 'examples' property to 'tests' --- source/Ox/js/JavaScript.js | 72 +++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/source/Ox/js/JavaScript.js b/source/Ox/js/JavaScript.js index 32b81fac..bfc26943 100644 --- a/source/Ox/js/JavaScript.js +++ b/source/Ox/js/JavaScript.js @@ -27,6 +27,7 @@ Ox.doc Generates documentation for annotated JavaScript usage <[o]> Usage (array of doc objects) Present if the type of the item is "function". + tests <[o]> Tests (array of test objects) type Type of the item (file, callback) -> undefined (files, callback) -> undefined @@ -36,7 +37,7 @@ Ox.doc Generates documentation for annotated JavaScript callback Callback function doc <[o]> Array of doc objects # > Ox.doc("//@ My.FOO Magic constant\nMy.FOO = 23;") - # [{"name": "Ox.foo", "summary": "just some string", "type": "string"}] + # [{"name": "Ox.foo", "summary": "Magic constant", "type": "number"}] @*/ Ox.doc = (function() { // fixme: dont require the trailing '@' @@ -91,10 +92,10 @@ Ox.doc = (function() { var key, line = node.line, subitem; if (!/^#/.test(node.line)) { if (/^