Skip to content

Commit

Permalink
chore(deps-dev): bump the vitest group with 1 update (#182)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump the vitest group with 1 update

Bumps the vitest group with 1 update: [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `vitest` from 1.1.1 to 1.1.3
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v1.1.3/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: vitest cannot mock

* chore: build

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andy Kenward <[email protected]>
  • Loading branch information
dependabot[bot] and andykenward authored Jan 14, 2024
1 parent ff09ecf commit 6a28e17
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 100 deletions.
8 changes: 4 additions & 4 deletions __tests__/helpers/env.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import {vi} from 'vitest'

import {raise} from '@/src/utils.js'

export const TEST_ENV_VARS: NodeJS.ProcessEnv = {
GITHUB_HEAD_REF: 'mock-github-head-ref',
GITHUB_REF: 'refs/heads/mock-github-ref',
Expand All @@ -17,8 +15,10 @@ export const TEST_ENV_VARS: NodeJS.ProcessEnv = {

export const stubTestEnvVars = () => {
for (const key in TEST_ENV_VARS) {
const value =
TEST_ENV_VARS[key] ?? raise(`Missing TEST_ENV_VARS value for key: ${key}`)
const value = TEST_ENV_VARS[key]
if (!value) {
throw new Error(`Missing TEST_ENV_VARS value for key: ${key}`)
}
vi.stubEnv(key, value)
}
}
2 changes: 1 addition & 1 deletion __tests__/helpers/inputs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {vi} from 'vitest'

import {INPUT_KEYS_REQUIRED} from '@/src/inputs.js'
import {INPUT_KEYS_REQUIRED} from '../../input-keys.js'

const INPUT_KEY = `INPUT_`

Expand Down
4 changes: 3 additions & 1 deletion dist/index.js

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

6 changes: 3 additions & 3 deletions dist/index.js.map

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions input-keys.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const INPUT_KEY_CLOUDFLARE_ACCOUNT_ID = 'cloudflare-account-id' as const
export const INPUT_KEY_CLOUDFLARE_API_TOKEN = 'cloudflare-api-token' as const
export const INPUT_KEY_CLOUDFLARE_PROJECT_NAME =
'cloudflare-project-name' as const
export const INPUT_KEY_DIRECTORY = 'directory' as const
export const INPUT_KEY_GITHUB_ENVIRONMENT = 'github-environment' as const
export const INPUT_KEY_GITHUB_TOKEN = 'github-token' as const

export const INPUT_KEYS_REQUIRED = [
INPUT_KEY_CLOUDFLARE_ACCOUNT_ID,
INPUT_KEY_CLOUDFLARE_API_TOKEN,
INPUT_KEY_CLOUDFLARE_PROJECT_NAME,
INPUT_KEY_DIRECTORY,
INPUT_KEY_GITHUB_ENVIRONMENT,
INPUT_KEY_GITHUB_TOKEN
] as const
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"tsx": "4.7.0",
"typescript": "5.3.3",
"undici": "5.27.0",
"vitest": "1.1.1"
"vitest": "1.1.3"
},
"pnpm": {
"peerDependencyRules": {
Expand Down
Loading

0 comments on commit 6a28e17

Please sign in to comment.