Closed dschweinbenz closed 1 year ago
Latest commit: 22d0348bd7abb6d8909b37185bca526407958b62
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Cool! Thanks for your contribution! Could you add some tests for the code?
I have added some tests, hope that fits your expectations. I'll be on holiday now for some days. Would be great if this fix gets merged, as I need it in production in two weeks :)
Is there a manual somewhere how to run / use the tests inside the example/demo folder? If i run pnpm i inside the folder as well as pnpm run dev I get the following:
FAIL test/codepage.test.ts [ test/codepage.test.ts ]
Error: Cannot find module '/home/pi/node-escpos/examples/demo/dist/index.mjs'. Please verify that the package.json has a valid "main" entry
❯ test/codepage.test.ts:2:15
1| 'use strict';
2| const escpos = require('../');
| ^
3| const path = require('path');
4|
Also I am wondering where the method Printer.create comes from inside example/demo/test/promise.test.ts?
Fixed #50