diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fb3b48..d60eddb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,10 +65,9 @@ jobs: test-mac: needs: [ lint, get-lts ] - runs-on: ${{ matrix.os }} + runs-on: macos-latest strategy: matrix: - os: [macos-latest] node-version: ${{ fromJson(needs.get-lts.outputs.active) }} fail-fast: false steps: @@ -90,12 +89,12 @@ jobs: test-win: # if: false needs: [ lint, get-lts ] - runs-on: ${{ matrix.os }} + runs-on: windows-latest strategy: matrix: - os: [windows-latest] node-version: ${{ fromJson(needs.get-lts.outputs.active) }} fail-fast: false + experimental: true steps: - name: Install MySQL run: | diff --git a/lib/user.js b/lib/user.js index 7d0ed13..da41c55 100644 --- a/lib/user.js +++ b/lib/user.js @@ -68,7 +68,8 @@ class User { const u = await this.read({ nt_user_id: args.nt_user_id }) if (u.length === 1) { await mysql.execute(`UPDATE nt_user SET deleted=? WHERE nt_user_id=?`, [ - val ?? 1, u[0].nt_user_id, + val ?? 1, + u[0].nt_user_id, ]) } } @@ -124,7 +125,8 @@ class User { // Check for HMAC SHA-1 password if (/^[0-9a-f]{40}$/.test(passDb)) { - const digest = crypto.createHmac('sha1', username.toLowerCase()) + const digest = crypto + .createHmac('sha1', username.toLowerCase()) .update(passTry) .digest('hex') if (this.debug) console.log(`digest: (${digest === passDb}) ${digest}`) diff --git a/package.json b/package.json index a42b31b..4f6e5ff 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "prettier": "npx prettier *.js lib routes test html --check", "prettier:fix": "npm run prettier -- --write", "start": "NODE_ENV=production node ./server", - "test": "test/run.sh", + "test": "test/fixtures/run.sh", "versions": "npx dependency-version-checker check", "watch": "npm run test -- --watch" }, diff --git a/test/.setup.js b/test/fixtures/.setup.js similarity index 100% rename from test/.setup.js rename to test/fixtures/.setup.js diff --git a/test/.teardown.js b/test/fixtures/.teardown.js similarity index 100% rename from test/.teardown.js rename to test/fixtures/.teardown.js diff --git a/test/fixtures/run.sh b/test/fixtures/run.sh new file mode 100755 index 0000000..9c6fa25 --- /dev/null +++ b/test/fixtures/run.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +node test/fixtures/.setup.js +node --test +node test/fixtures/.teardown.js \ No newline at end of file diff --git a/test/run.sh b/test/run.sh deleted file mode 100755 index 5b81082..0000000 --- a/test/run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -node test/.setup.js -node --test -node test/.teardown.js \ No newline at end of file