Skip to content

Commit 56f54ff

Browse files
committed
module support
1 parent 7067c5e commit 56f54ff

10 files changed

+36
-68
lines changed

js/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "qrcode-generator",
3-
"version": "1.4.4",
3+
"version": "1.5.0",
44
"description": "QR Code Generator implementation in JavaScript.",
55
"author": "Kazuhiko Arase",
66
"main": "qrcode.js",
@@ -22,7 +22,7 @@
2222
"test": "test"
2323
},
2424
"scripts": {
25-
"test": "wtr test/*.test.html --node-resolve --coverage"
25+
"test": "wtr"
2626
},
2727
"devDependencies": {
2828
"@open-wc/testing": "^4.0.0",

js/test/qrcode-module.test.html

Lines changed: 0 additions & 18 deletions
This file was deleted.

js/test/qrcode-test-impl.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { expect } from "@open-wc/testing";
22

33

44
const limit = 80;
5-
6-
const debug = true;
5+
const debug = false;
76

87
export const capture = function(varName, s) {
98
let code = '';

js/test/qrcode.test.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
import { qrcode } from '../qrcode.mjs';
3+
import { overview as test } from './qrcode-test-impl.js';
4+
5+
test(qrcode);

js/test/qrcode_SJIS-module.test.html

Lines changed: 0 additions & 23 deletions
This file was deleted.

js/test/qrcode_SJIS.test.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
import { qrcode } from '../qrcode.mjs';
3+
import { stringToBytes } from '../qrcode_SJIS.mjs';
4+
import { sjis as test } from './qrcode-test-impl.js';
5+
import { misc } from './qrcode-test-impl.js';
6+
7+
qrcode.stringToBytes = stringToBytes;
8+
9+
test(qrcode);
10+
misc(qrcode);

js/test/qrcode_UTF8-module.test.html

Lines changed: 0 additions & 21 deletions
This file was deleted.

js/test/qrcode_UTF8.test.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
import { qrcode } from '../qrcode.mjs';
3+
import { stringToBytes } from '../qrcode_UTF8.mjs';
4+
import { utf8 as test } from './qrcode-test-impl.js';
5+
6+
qrcode.stringToBytes = stringToBytes;
7+
8+
test(qrcode);

js/web-test-runner.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default {
2+
files: [
3+
'test/*.test.html',
4+
'test/*.test.mjs',
5+
],
6+
nodeResolve: true,
7+
coverage : true,
8+
};

0 commit comments

Comments
 (0)