Skip to content

Commit

Permalink
Merge pull request #301 from mdb/improve-tests
Browse files Browse the repository at this point in the history
upgrade packages and improve tests
  • Loading branch information
mdb committed Feb 10, 2023
2 parents 5eb02b5 + 2b8d642 commit 8b0c123
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 88 deletions.
9 changes: 4 additions & 5 deletions __tests__/is-existing-release.test.ts
Expand Up @@ -35,11 +35,10 @@ test('does not find a corresponding release tag', async () => {

test('the GitHub API responds with an error', async () => {
const response = {status: 500}

mockOctokit.rest.repos.getReleaseByTag.mockRejectedValueOnce(response)

try {
await isExistingRelease('mdb', 'terraputs', '500.0.0')
} catch (error) {
expect(error).toBe(response)
}
await expect(
isExistingRelease('mdb', 'terraputs', '500.0.0')
).rejects.toStrictEqual(response)
})
154 changes: 77 additions & 77 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "ensure-unpublished-release-action",
"version": "0.1.4",
"version": "0.1.5",
"description": "Check that a given GitHub release tag does not already exist",
"main": "lib/main.js",
"scripts": {
Expand Down Expand Up @@ -28,16 +28,16 @@
"@actions/github": "5.1.1"
},
"devDependencies": {
"@types/node": "^18.11.18",
"@typescript-eslint/parser": "^5.49.0",
"@vercel/ncc": "^0.36.0",
"@types/node": "^18.13.0",
"@typescript-eslint/parser": "^5.51.0",
"@vercel/ncc": "^0.36.1",
"eslint": "^8.33.0",
"eslint-plugin-github": "^4.6.0",
"eslint-plugin-jest": "^27.2.1",
"jest": "^27.4.7",
"js-yaml": "^4.1.0",
"prettier": "2.8.3",
"prettier": "2.8.4",
"ts-jest": "^27.1.3",
"typescript": "^4.9.4"
"typescript": "^4.9.5"
}
}

0 comments on commit 8b0c123

Please sign in to comment.