-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adrian
committed
Jun 22, 2013
1 parent
fef7c58
commit e4770e0
Showing
5 changed files
with
127 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* | ||
* User: adrianjones | ||
* Date: 6/21/13 | ||
* Time: 3:02 PM | ||
*/ | ||
|
||
var assert = require("assert"); | ||
var printer = require('../lib/pos_printer.js'); | ||
var printerOb = {host:'localhost', port :9100}; | ||
describe('Print Job', function(){ | ||
|
||
it('test Simple print', function(done){ | ||
|
||
printer.print(printerOb,'print1',function(result){ | ||
done(result); | ||
}) | ||
}) | ||
|
||
it('test repeat print', function(){ | ||
var i = 0; | ||
for(i = 0 ; i < 300 ; i++){ | ||
printer.print(printerOb,'print'+i,function(result){ | ||
if (i > 298) | ||
done(); | ||
}) | ||
|
||
} | ||
}) | ||
|
||
})/** | ||
* | ||
* User: adrianjones | ||
* Date: 6/21/13 | ||
* Time: 3:03 PM | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* | ||
* User: adrianjones | ||
* Date: 6/21/13 | ||
* Time: 3:02 PM | ||
*/ | ||
var assert = require("assert") | ||
describe('Array', function(){ | ||
describe('#indexOf()', function(){ | ||
it('should return -1 when the value is not present', function(){ | ||
assert.equal(-1, [1,2,3].indexOf(5)); | ||
assert.equal(-1, [1,2,3].indexOf(0)); | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* | ||
* User: adrianjones | ||
* Date: 6/21/13 | ||
* Time: 7:17 PM | ||
*/ | ||
var testFiles=["test/test.js","test/pos_printer.js"]; | ||
|
||
|
||
var Mocha = require('mocha'); | ||
|
||
|
||
var mocha = new Mocha; | ||
|
||
|
||
mocha.reporter('spec').ui('bdd'); | ||
|
||
|
||
for (var i =0;i<testFiles.length;i++){ | ||
|
||
|
||
mocha.addFile(testFiles[i]); | ||
|
||
|
||
} | ||
|
||
var runner = mocha.run(function(){ | ||
|
||
console.log('finished'); | ||
|
||
}); |