diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 05d2b38..c01b378 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build on Node.js ${{ inputs.node-version }} uses: actions/setup-node@v3 with: diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index ababe23..1c1d2cc 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -19,7 +19,7 @@ jobs: release-package: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 with: name: ngx-kjua diff --git a/setup-jest.ts b/setup-jest.ts index a702c63..f74884c 100644 --- a/setup-jest.ts +++ b/setup-jest.ts @@ -1 +1,8 @@ import "jest-preset-angular/setup-jest"; +import "./projects/ngx-kjua/src/lib/kjua/lib/qrcode" + +// We have to mock the whole thing as "qrcode-generator" needs to override the stringToBytes method +// but typescript can't properly hande that +jest.mock("./projects/ngx-kjua/src/lib/kjua/lib/qrcode", ()=>({ + quiet_qrcode: jest.fn() +})) diff --git a/tsconfig.json b/tsconfig.json index aeb72a4..d95764e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,10 +24,10 @@ "experimentalDecorators": true, "moduleResolution": "node", "importHelpers": true, - "target": "es2020", - "module": "es2020", + "target": "es6", + "module": "es6", "lib": [ - "es2020", + "es6", "dom" ] },