Skip to content

Commit

Permalink
Changed to format: "auto" in readme and fixed a test
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Lindell committed Mar 2, 2016
1 parent cf4746a commit 40f116c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@ The default options:
----
````javascript
{
width: 2,
height: 100,
quite: 10,
format: "CODE128",
displayValue: false,
fontOptions: "",
font: "monospace",
textAlign: "center",
textPadding: 0,
fontSize: 12,
backgroundColor: "",
lineColor: "#000"
width: 2,
height: 100,
quite: 10,
format: "auto",
displayValue: false,
fontOptions: "",
font: "monospace",
textAlign: "center",
textPadding: 0,
fontSize: 12,
backgroundColor: "",
lineColor: "#000"
}
````
5 changes: 2 additions & 3 deletions test/JsBarcode.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ var assert = require('assert');
var JsBarcode = require('../JsBarcode.js');
var Canvas = require("canvas");

var CODE39, CODE128, EAN, UPC, EAN8, ITF14, ITF, Pharmacode;
describe('Encoders', function() {
it('should be able to include all encoders', function () {
CODE39 = JsBarcode.getModule("CODE39");
Expand Down Expand Up @@ -102,8 +101,8 @@ describe('node-canvas generation', function() {
var ctx1 = canvas1.getContext("2d");
var ctx2 = canvas2.getContext("2d");

JsBarcode(canvas1, "HELLO", {format: "CODE39"});
JsBarcode(canvas2, "HELLO");
JsBarcode(canvas1, "HELL0", {format: "CODE39"});
JsBarcode(canvas2, "HELL0");

assert.equal(canvas1.toDataURL(), canvas2.toDataURL());
});
Expand Down

0 comments on commit 40f116c

Please sign in to comment.