diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f48292b..6829db2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,12 +15,12 @@ jobs: strategy: matrix: - node-version: [12.x] + node-version: [18.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - run: node ./referers.test.js \ No newline at end of file + - run: node ./referers.test.js diff --git a/referers.json b/referers.json index 82a282f..39db238 100644 --- a/referers.json +++ b/referers.json @@ -36,5 +36,6 @@ "https://geolonia.ap.ngrok.io", "https://*.vercel.app", "https://*.preview.app.github.dev", - "https://*.pages.dev" + "https://*.pages.dev", + "https://*.*.pages.dev" ] diff --git a/referers.test.js b/referers.test.js index aebf167..d48a856 100644 --- a/referers.test.js +++ b/referers.test.js @@ -1,17 +1,17 @@ -const fs = require('fs') -const referersjson = fs.readFileSync('./referers.json') +const fs = require('fs'); +const referersjson = fs.readFileSync('./referers.json'); // should be parsed as JSON. -const referers = JSON.parse(referersjson) +const referers = JSON.parse(referersjson); // Should be an Array. if(!Array.isArray(referers)) { - throw new Error('Should be an Array.') + throw new Error('Should be an Array.'); } // Should be string values. if(referers.some(referer => typeof referer !== 'string')) { - throw new Error('Should be string values.') + throw new Error('Should be string values.'); } -console.log('success.') \ No newline at end of file +console.log('success.');