Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshurajora committed Dec 14, 2023
1 parent 21a75ef commit 3f8c499
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ on:
pull_request:
branches: ["main"]

env:
YOURLS_USERNAME: ${{ vars.YOURLS_USERNAME }}
YOURLS_PASSWORD: ${{vars.YOURLS_PASSWORD}}
YOURLS_SERVER_URL: ${{vars.YOURLS_SERVER_URL}}

jobs:
build:
runs-on: ubuntu-latest
environment: Test

strategy:
matrix:
Expand All @@ -26,6 +22,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
env:
YOURLS_USERNAME: ${{ vars.YOURLS_USERNAME }}
YOURLS_PASSWORD: ${{vars.YOURLS_PASSWORD}}
YOURLS_SERVER_URL: ${{vars.YOURLS_SERVER_URL}}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
Expand Down
6 changes: 3 additions & 3 deletions index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ dotenv.config();

test("Should get a unique shorturl without any errors", async () => {
const response = await getShortLink({
username: process.env["YOURLS_USERNAME"]!,
password: process.env["YOURLS_PASSWORD"]!,
serverUrl: process.env["YOURLS_SERVER_URL"]!,
username: process.env["YOURLS_USERNAME"] as string,
password: process.env["YOURLS_PASSWORD"] as string,
serverUrl: process.env["YOURLS_SERVER_URL"] as string,
// A uniquely generated url
url: `https://example-${Date.now()}.com`,
});
Expand Down

0 comments on commit 3f8c499

Please sign in to comment.