Initial commit: Epson ePOS Node backend + Vue3 UI (printer matricial2)
This commit is contained in:
22
scripts/tests/06_qr.js
Normal file
22
scripts/tests/06_qr.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const { post, ensureOk } = require('./common');
|
||||
|
||||
async function run() {
|
||||
const data = await post('/api/print', {
|
||||
operations: [
|
||||
{ op: 'textAlign', align: 'center' },
|
||||
{ op: 'text', value: 'Test 6: QR' },
|
||||
{ op: 'feedLine', line: 1 },
|
||||
{ op: 'qrcode', data: 'https://example.com/test6', model: 'qrcode_model_2', level: 'level_m', size: 6 },
|
||||
{ op: 'feedLine', line: 2 }
|
||||
]
|
||||
});
|
||||
console.log('06_qr ->', data);
|
||||
ensureOk(data, '06_qr');
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
run().catch((e) => { console.error(e.message); process.exit(1); });
|
||||
}
|
||||
|
||||
module.exports = run;
|
||||
|
||||
Reference in New Issue
Block a user