diff --git a/source/Ox/js/JavaScript.js b/source/Ox/js/JavaScript.js index 6ac7fd89..eb0359ed 100644 --- a/source/Ox/js/JavaScript.js +++ b/source/Ox/js/JavaScript.js @@ -41,24 +41,24 @@ Ox.doc Generates documentation for annotated JavaScript statement Statement type Type of the item > Ox.test.doc[0].name 'My.FOO' @@ -68,9 +68,9 @@ Ox.doc Generates documentation for annotated JavaScript 'Magic constant' > Ox.test.doc[1].description 'Bar per baz is a good indicator of an item\'s foo-ness.' - > Ox.test.doc[1].signature[0].types + > Ox.test.doc[1].returns[0].types ['number'] - > Ox.test.doc[1].signature[0].summary + > Ox.test.doc[1].returns[0].summary 'Bar per baz, or NaN' > Ox.test.doc[1].tests[1] {expected: 'NaN', statement: 'My.foo({})'} @@ -625,20 +625,21 @@ Ox.test Takes JavaScript, runs inline tests, returns results Ox.test.foo = function(item) { return item.bar / item.baz; }; - Ox.test.source = - '/*@\n'+ - 'Ox.test.foo Returns an items\'s bar per baz\n' + - ' Bar per baz is a good indicator of an item\'s foo-ness.\n' + - ' (item) -> Bar per baz, or NaN\n' + - ' item Any item\n' + - ' > Ox.test.foo({bar: 1, baz: 10})\n' + - ' 0.1\n' + - ' > Ox.test.foo({})\n' + - ' NaN\n' + - '@*' + '/\n' + - 'Ox.test.foo = function(item) {\n' + - ' return item.bar / item.baz;\n' + - '};'; + Ox.test.source = [ + '/*@', + 'Ox.test.foo Returns an items\'s bar per baz', + ' Bar per baz is a good indicator of an item\'s foo-ness.', + ' (item) -> Bar per baz, or NaN', + ' item Any item', + ' > Ox.test.foo({bar: 1, baz: 10})', + ' 0.1', + ' > Ox.test.foo({})', + ' NaN', + '@*' + '/', + 'Ox.test.foo = function(item) {', + ' return item.bar / item.baz;', + '};' + ].join('\n'); > Ox.test(Ox.test.source, function(r) { Ox.test(r[0].passed, true); }) undefined