Check in Jusfox skeleton

This commit is contained in:
Klaus-Uwe Mitterer 2016-07-19 17:19:05 +02:00
commit 8fe3a96b33
4 changed files with 46 additions and 0 deletions

2
README.md Normal file
View file

@ -0,0 +1,2 @@
#Jusfox
Legislative text finder

9
index.js Normal file
View file

@ -0,0 +1,9 @@
var self = require("sdk/self");
// a dummy function, to show how tests work.
// to see how to test this function, look at test/test-index.js
function dummy(text, callback) {
callback(text);
}
exports.dummy = dummy;

16
package.json Normal file
View file

@ -0,0 +1,16 @@
{
"title": "Jusfox",
"name": "jusfox",
"version": "0.0.1",
"description": "Legislative text finder",
"main": "index.js",
"author": "Klaus-Uwe Mitterer",
"engines": {
"firefox": ">=38.0a1",
"fennec": ">=38.0a1"
},
"license": "Kumi License",
"keywords": [
"jetpack"
]
}

19
test/test-index.js Normal file
View file

@ -0,0 +1,19 @@
var main = require("../");
exports["test main"] = function(assert) {
assert.pass("Unit test running!");
};
exports["test main async"] = function(assert, done) {
assert.pass("async Unit test running!");
done();
};
exports["test dummy"] = function(assert, done) {
main.dummy("foo", function(text) {
assert.ok((text === "foo"), "Is the text actually 'foo'");
done();
});
};
require("sdk/test").run(exports);