Skip to content

Commit 9aa6993

Browse files
authored
fix: update default value of 'webdriverio.configFilePattern' (#47)
## Proposed changes Fix omission of updating Default value of `webdriverio.configFilePattern`. ## Types of changes [//]: # 'What types of changes does your code introduce to WebdriverIO?' [//]: # '_Put an `x` in the boxes that apply_' - [ ] Polish (an improvement for an existing feature) - [X] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update (improvements to the project's docs) - [ ] Internal updates (everything related to internal scripts, governance documentation and CI files) ## Checklist [//]: # "_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._" - [X] I have read the [CONTRIBUTING](https://github.com/webdriverio/vscode-webdriverio/blob/main/CONTRIBUTION.md) doc - [x] I have added tests that prove my fix is effective or that my feature works - [ ] I have added the necessary documentation (if appropriate) - [ ] I have added proper type definitions for new commands (if appropriate) ## Further comments [//]: # 'If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...' ### Reviewers: @webdriverio/project-committers
1 parent 3557cc5 commit 9aa6993

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

packages/vscode-webdriverio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"type": "string"
9090
},
9191
"default": [
92-
"**/wdio.conf.{ts,js}"
92+
"**/*wdio*.conf*.{ts,js,mjs,cjs,cts,mts}"
9393
],
9494
"description": "Glob pattern for WebdriverIO configuration file"
9595
},
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { DEFAULT_CONFIG_VALUES, EXTENSION_ID } from '@vscode-wdio/constants'
2+
import { describe, it, expect } from 'vitest'
3+
4+
import pkg from '../package.json' with { type: 'json' }
5+
6+
describe('package.json', ()=>{
7+
8+
const testPattern = []
9+
for (const [key, value] of Object.entries(DEFAULT_CONFIG_VALUES)) {
10+
testPattern.push([key, value])
11+
}
12+
13+
const pkgConfig = pkg.contributes.configuration.properties
14+
15+
it.each(testPattern)('should set default value - %s', (key, value)=>{
16+
// @ts-ignore
17+
const pkgConfigValue = pkgConfig[`${EXTENSION_ID}.${key}`]['default']
18+
expect(pkgConfigValue).toStrictEqual(value)
19+
})
20+
})

tsconfig.base.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"skipLibCheck": true,
1111

1212
"declaration": true,
13-
"declarationMap": true
13+
"declarationMap": true,
14+
"resolveJsonModule": true
1415
/* Additional Checks */
1516
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
1617
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

0 commit comments

Comments
 (0)