Permalink
Browse files

Add a couple of exports and - undocumented for now

  • Loading branch information...
1 parent 47821bb commit b61780f79c3eb8f73ae4f55e78e954393a921043 @gotwarlost gotwarlost committed Oct 31, 2012
Showing with 18 additions and 9 deletions.
  1. +1 −0 README.md
  2. +6 −1 index.js
  3. +1 −1 package.json
  4. +10 −7 test/other/test-index-xface.js
View
@@ -133,6 +133,7 @@ All the features of istanbul can be accessed as a library using its [public API]
Changelog
---------
+* v0.1.17 : Export some more objects; undocumented for now
* v0.1.16 : Fix npm keywords for istanbul which expects an array of strings but was being fed a single string with keywords instead
* v0.1.15 : Add the 'check-coverage' command so that Istanbul can be used as a posttest script to enforce minimum coverage
* v0.1.14 : Expose the experimental YUI load hook in the interface
View
@@ -17,6 +17,7 @@ var path = require('path'),
Report = require('./lib/report'),
meta = require('./lib/util/meta');
+//register our standard plaugins
require('./lib/register-plugins');
/**
@@ -104,7 +105,11 @@ module.exports = {
*/
VERSION: meta.VERSION,
//undocumented
- _yuiLoadHook: require('./lib/util/yui-load-hook').getPostLoadHook
+ _yuiLoadHook: require('./lib/util/yui-load-hook').getPostLoadHook,
+ //undocumented
+ TreeSummarizer: require('./lib/util/tree-summarizer'),
+ //undocumented
+ assetsDir: path.resolve(__dirname, 'lib', 'vendor')
};
View
@@ -1,6 +1,6 @@
{
"name": "istanbul",
- "version": "0.1.16",
+ "version": "0.1.17",
"description": "Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale",
"keywords": [ "coverage", "code coverage", "JS code coverage", "JS coverage" ],
"author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",
@@ -1,14 +1,17 @@
var main = require('../../index');
+
module.exports = {
"xface": function (test) {
- test.ok(main.Instrumenter);
- test.ok(main.Store);
- test.ok(main.Collector);
- test.ok(main.Report);
- test.ok(main.hook);
- test.ok(main.utils);
- test.ok(main._yuiLoadHook && typeof main._yuiLoadHook === 'function');
+ [ 'Instrumenter', 'Store', 'Collector', 'Report', '_yuiLoadHook'].forEach(function (key) {
+ test.ok(main[key] && typeof main[key] === 'function', key + ' was not exported as a function!');
+ });
+ [ 'hook', 'utils' ].forEach(function (key) {
+ test.ok(main[key] && typeof main[key] === 'object', key + ' was not exported as an object!');
+ });
+ [ 'assetsDir'].forEach(function (key) {
+ test.ok(main[key] && typeof main[key] === 'string', key + ' was not exported as a string!');
+ });
test.done();
}
};

0 comments on commit b61780f

Please sign in to comment.