Skip to content

Commit

Permalink
added tests and progressed on node-pre-gyp closes #150
Browse files Browse the repository at this point in the history
  • Loading branch information
tojocky committed Nov 17, 2016
1 parent a9d6827 commit e456b00
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -35,6 +35,7 @@ after_script:


- node-pre-gyp configure - node-pre-gyp configure
- node-pre-gyp build package --target_arch=ia32 - node-pre-gyp build package --target_arch=ia32
- npm test


# Need S3 Upload for Artifacts # Need S3 Upload for Artifacts
# addons: # addons:
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -44,7 +44,7 @@ install:
test_script: test_script:
- node --version - node --version
- npm --version - npm --version
# - cmd: npm test - cmd: npm test


after_test: after_test:
- node-gyp clean - node-gyp clean
Expand Down
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -27,7 +27,9 @@
"node": ">= 0.8.0" "node": ">= 0.8.0"
}, },
"scripts": { "scripts": {
"install": "node-pre-gyp install --fallback-to-build" "preinstall": "npm install node-pre-gyp",
"install": "node-pre-gyp install --fallback-to-build",
"test": "nodeunit test"
}, },
"binary": { "binary": {
"module_name": "node_printer", "module_name": "node_printer",
Expand Down
14 changes: 14 additions & 0 deletions test/getPrinters.js
@@ -0,0 +1,14 @@
exports.testLoadLibrary = function(test) {
test.doesNotThrow(function(){
printer = require("../");
});
test.done();
}

exports.testGetprinters = function(test) {
printer = require("../");
test.equal(typeof(printer.getPrinters()), 'object');
test.done();
}

// TODO: add more tests

0 comments on commit e456b00

Please sign in to comment.