Skip to content
Permalink
Browse files

added tests and progressed on node-pre-gyp closes #150

  • Loading branch information...
tojocky committed Nov 17, 2016
1 parent a9d6827 commit e456b00d57c456603b1c8b91c00f6f9bd0823b6a
Showing with 19 additions and 2 deletions.
  1. +1 −0 .travis.yml
  2. +1 −1 appveyor.yml
  3. +3 −1 package.json
  4. +14 −0 test/getPrinters.js
@@ -35,6 +35,7 @@ after_script:

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

# Need S3 Upload for Artifacts
# addons:
@@ -44,7 +44,7 @@ install:
test_script:
- node --version
- npm --version
# - cmd: npm test
- cmd: npm test

after_test:
- node-gyp clean
@@ -27,7 +27,9 @@
"node": ">= 0.8.0"
},
"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": {
"module_name": "node_printer",
@@ -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.
You can’t perform that action at this time.