Rework javascript api to match README

This commit is contained in:
Jimmy Miller
2015-02-07 00:01:35 -05:00
parent ce81ef793a
commit 8fe8c15e6d
6 changed files with 138 additions and 54 deletions

View File

@@ -8,7 +8,8 @@
*/
var layoutTestUtils = require('./Layout-test-utils.js');
var computeLayout = require('./Layout.js');
var computeLayout = require('./Layout.js').computeLayout;
var fillNodes = require('./Layout.js').fillNodes;
var fs = require('fs');
var JavaTranspiler = require('./JavaTranspiler.js');
@@ -30,7 +31,11 @@ global.layoutTestUtils = {
textSizes: layoutTestUtils.textSizes
};
global.describe = function(name, cb) { cb(); };
global.describe = function(name, cb) {
if(name == 'Layout') {
cb();
}
};
global.it = function(name, cb) { currentTest = name; cb(); };
global.xit = function() { /* ignore skipped tests */ };