Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes and updates for v0.7.4 #48

Merged
merged 5 commits into from
Aug 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format of this changelog is loosely based on [Keep a Changelog](https://keep
<details>
<summary>Releases</summary>

- [0.7.4 - Aug 27, 2022](#074---aug-27-2022)
- [0.7.3 - Jul 29, 2022](#073---jul-29-2022)
- [0.7.2 - Jul 27, 2022](#072---jul-27-2022)
- [0.7.1 - Jul 24, 2022](#071---jul-24-2022)
Expand All @@ -22,6 +23,26 @@ The format of this changelog is loosely based on [Keep a Changelog](https://keep
</details>


---
## [0.7.4] - Aug 27, 2022

### Added

- Experimental new `karmaTestExplorer.enabledParserPlugins` extension setting for specifying exact set of parser plugins to enable for supporting the specific language syntaxes present in user's test files

### Changed

- Parser plugins enabled by default now include support for decorators syntax in test sources, which addresses [this issue](https://github.com/lucono/karma-test-explorer/issues/46)
- The `karmaTestExplorer.projects` extension setting has been renamed to `karmaTestExplorer.projectWorkspaces` to avoid confusion with Angular workspace projects
- The `projectRootPath` property of the object format for specifying projects has been renamed to `rootPath` to better align with the new naming of its parent `karmaTestExplorer.projectWorkspaces` setting
- Improved error logging for scenarios where Karma fails to start or quits unexpectedly

### Fixed

- Fixed an [issue](https://github.com/lucono/karma-test-explorer/issues/47) where breakpoints are not hit when debugging projects that are not located directly in the VS Code workspace root
- Fixed an [issue](https://github.com/lucono/karma-test-explorer/issues/49) where tests are unmapped when Typescript angle bracket cast syntax is used in non-JSX test files
- Addressed an [issue](https://github.com/lucono/karma-test-explorer/issues/45) to add support for a Karma configuration scenario that works with Karma but not with the extension

---
## [0.7.3] - Jul 29, 2022

Expand All @@ -34,7 +55,7 @@ The format of this changelog is loosely based on [Keep a Changelog](https://keep

### Fixed

- Fixed an [issue](https://github.com/lucono/karma-test-explorer/issues/37) introduced in `v.0.7.0` that prevented new Angular projects that don't specify a default project in `angular.json` from loading
- Fixed an [issue](https://github.com/lucono/karma-test-explorer/issues/37) introduced in `v0.7.0` that prevented new Angular projects that don't specify a default project in `angular.json` from loading

---
## [0.7.1] - Jul 24, 2022
Expand Down
3 changes: 2 additions & 1 deletion docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Though Karma Test Explorer comes with many configuration options that make it fl
Setting | Description
-----------------------------------------------|---------------------------------------------------------------
`karmaTestExplorer.enableExtension` | Explicitly enables or disables Karma Test Explorer when its default project inspection to automatically enable or disable itself does not yield the desired decision
`karmaTestExplorer.projects` | This is a list, each entry of which is either a string of the relative path (relative to the workspace root folder) to a project for testing, or an object having a `projectRootPath` property with the value of that path. The object format also accepts the following optional properties which can be used to provide the corresponding settings specifically for that project - `projectType`, `karmaConfFilePath`, `testFramework`, `testFiles`, `excludeFiles`, `testsBasePath`. Like other Karma Test Explorer settings, when not explicitly configured, most settings will be auto-detected where possible with reasonable values for each project
`karmaTestExplorer.projectWorkspaces` | Experimental and subject to change in future releases! This is a list, each entry of which is either a string of the relative path (relative to the VS Code workspace root folder) to a project workspace for testing, or an object having a `rootPath` property with the value of that path. The object format also accepts the following optional properties which can be used to provide the corresponding settings specifically for that project workspace - `projectType`, `karmaConfFilePath`, `testFramework`, `testFiles`, `excludeFiles`, `testsBasePath`. Like other Karma Test Explorer settings, when not explicitly configured, most settings will be auto-detected where possible with reasonable values for each project workspace
`karmaTestExplorer.projectType` | The type of the project. This will be auto-detected if not specified. Specify the right project type if not correctly auto-detected
`karmaTestExplorer.testFramework` | The test framework used by the project. This will be auto-detected if not specified. Specify the right test framework if not correctly auto-detected
`karmaTestExplorer.karmaConfFilePath` | The path where the `karma.conf.js` file is located (relative to the project root path)
Expand All @@ -171,6 +171,7 @@ Setting | Description
`karmaTestExplorer.angularProcessCommand` | The command or path to an executable to use for launching or running Angular tests. This is useful for using a custom script or different command other than the default
`karmaTestExplorer.testTriggerMethod` | Experimental. Specifies how test runs are triggered by default, either through the Karma CLI or Http interface. You will usually not need to use this setting unless working around specific issues
`karmaTestExplorer.testParsingMethod` | Specifies how tests are parsed by default, either using regular expression matching or an abstract syntax tree. You will usually not need to use this setting unless working around specific issues
`karmaTestExplorer.enabledParserPlugins` | Experimental and subject to change in future releases! Specifies the exact set of Babel parser plugins to enable for parsing test files. Useful for enabling full support for various language syntaxes present in the test files
`karmaTestExplorer.failOnStandardError` | Treats any Karma, Angular, or other testing stderr output as a failure. This can sometimes be useful for uncovering testing issues
`karmaTestExplorer.testsBasePath` | The base folder containing the test files (relative to the project root path for Karma projects, or the project `root` path specified in `angular.json` for Angular workspace projects). If not specified, defaults to the longest common path of the tests discovered in the project
`karmaTestExplorer.testFiles` | The path glob patterns identifying the test files (relative to the project root path)
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

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

113 changes: 93 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"icon": "docs/img/extension-icon-128.png",
"author": "Lucas Ononiwu",
"publisher": "lucono",
"version": "0.7.3",
"version": "0.7.4",
"license": "MIT",
"homepage": "https://github.com/lucono/karma-test-explorer",
"repository": {
Expand Down Expand Up @@ -96,7 +96,7 @@
"ts-jest": "^27.1.3",
"type-fest": "^2.17.0",
"typescript": "^4.6.2",
"vsce": "^2.10.0",
"vsce": "^2.10.2",
"simple-get": "^3.1.1"
},
"engines": {
Expand Down Expand Up @@ -131,8 +131,8 @@
"default": null
},
"karmaTestExplorer.projectRootPath": {
"markdownDescription": "The path to the folder containing the project for testing (relative to the workspace root folder). Defaults to the workspace root folder if not specified",
"markdownDeprecationMessage": "This is deprecated. Use `karmaTestExplorer.projects` instead",
"markdownDescription": "The path to the folder containing the project for testing (relative to the VS Code workspace root folder). Defaults to the workspace root folder if not specified",
"markdownDeprecationMessage": "This is deprecated. Use `karmaTestExplorer.projectWorkspaces` instead",
"type": "string",
"scope": "resource"
},
Expand Down Expand Up @@ -176,6 +176,58 @@
"Parse test files with regular expression matching"
]
},
"karmaTestExplorer.enabledParserPlugins": {
"markdownDescription": "Experimental and subject to change in future releases! Specifies the exact set of Babel parser plugins to enable for parsing test files. Useful for enabling full support for various language syntaxes present in the test files",
"type": "array",
"scope": "resource",
"default": [],
"items": {
"type": "string",
"uniqueItems": true,
"enum": [
"asyncDoExpressions",
"asyncGenerators",
"bigInt",
"classPrivateMethods",
"classPrivateProperties",
"classProperties",
"classStaticBlock",
"decimal",
"decorators",
"decorators-legacy",
"decoratorAutoAccessors",
"destructuringPrivate",
"doExpressions",
"dynamicImport",
"estree",
"exportDefaultFrom",
"flow",
"flowComments",
"functionBind",
"functionSent",
"importMeta",
"jsx",
"logicalAssignment",
"importAssertions",
"moduleBlocks",
"moduleStringNames",
"nullishCoalescingOperator",
"numericSeparator",
"objectRestSpread",
"optionalCatchBinding",
"optionalChaining",
"partialApplication",
"pipelineOperator",
"placeholders",
"privateIn",
"regexpUnicodeSets",
"throwExpressions",
"topLevelAwait",
"typescript",
"v8intrinsic"
]
}
},
"karmaTestExplorer.nonHeadlessModeEnabled": {
"markdownDescription": "Enables non-headless testing so that the browser UI is displayed when running tests. Has no effect when running in a container, or when the default value of the `customLauncher` or `browser` config settings are overridden",
"type": "boolean",
Expand Down Expand Up @@ -226,7 +278,7 @@
"default": 9976
},
"karmaTestExplorer.karmaConfFilePath": {
"markdownDescription": "The path where the `karma.conf.js` file is located (relative to the project root path)",
"markdownDescription": "The path where the `karma.conf.js` file is located (relative to the project workspace root path)",
"type": "string",
"scope": "resource",
"default": "karma.conf.js"
Expand All @@ -246,16 +298,17 @@
]
},
"karmaTestExplorer.testsBasePath": {
"markdownDescription": "The base folder containing the test files (relative to the project root path for Karma projects, or the project `root` path specified in `angular.json` for Angular workspace projects). If not specified, defaults to the longest common path of the tests discovered in the project",
"markdownDescription": "The base folder containing the test files (relative to the project workspace root path for Karma projects, or the project `root` path specified in `angular.json` for Angular workspace projects). If not specified, defaults to the longest common path of the tests discovered in the project",
"type": "string",
"scope": "resource",
"default": null
},
"karmaTestExplorer.testFiles": {
"markdownDescription": "The path glob patterns identifying the test files (relative to the project root path)",
"markdownDescription": "The path glob patterns identifying the test files (relative to the project workspace root path)",
"type": "array",
"items": {
"type": "string"
"type": "string",
"uniqueItems": true
},
"scope": "resource",
"minItems": 1,
Expand All @@ -265,10 +318,11 @@
]
},
"karmaTestExplorer.excludeFiles": {
"markdownDescription": "The path glob patterns identifying files to be excluded from `testFiles` (relative to the project root path). The `node_modules` folder is always excluded",
"markdownDescription": "The path glob patterns identifying files to be excluded from `testFiles` (relative to the project workspace root path). The `node_modules` folder is always excluded",
"type": "array",
"items": {
"type": "string"
"type": "string",
"uniqueItems": true
},
"scope": "resource",
"default": []
Expand All @@ -277,7 +331,8 @@
"markdownDescription": "A list of files which when modified will trigger a Karma reload",
"type": "array",
"items": {
"type": "string"
"type": "string",
"uniqueItems": true
},
"scope": "resource",
"default": []
Expand Down Expand Up @@ -508,23 +563,39 @@
"default": ""
},
"karmaTestExplorer.projects": {
"markdownDescription": "This is a list, each entry of which is either a string of the relative path (relative to the workspace root folder) to a project for testing, or an object having a `projectRootPath` property with the value of that path. The object format also accepts the following optional properties which can be used to provide the corresponding settings specifically for that project - `projectType`, `karmaConfFilePath`, `testFramework`, `testFiles`, `excludeFiles`, `testsBasePath`. Like other Karma Test Explorer settings, when not explicitly configured, most settings will be auto-detected where possible with reasonable values for each project",
"markdownDescription": "This setting has been renamed to `karmaTestExplorer.projectWorkspaces` to avoid confusion with Angular workspace projects. Please update your setting to use the new name.",
"deprecationMessage": "Rename this setting to `karmaTestExplorer.projectWorkspaces`",
"markdownDeprecationMessage": "Rename this setting to `karmaTestExplorer.projectWorkspaces`",
"type": "array",
"scope": "resource",
"default": null
},
"karmaTestExplorer.projectWorkspaces": {
"markdownDescription": "Experimental and subject to change in future releases! This is a list, each entry of which is either a string of the relative path (relative to the VS Code workspace root folder) to a project workspace for testing, or an object having a `rootPath` property with the value of that path. The object format also accepts the following optional properties which can be used to provide the corresponding settings specifically for that project workspace - `projectType`, `karmaConfFilePath`, `testFramework`, `testFiles`, `excludeFiles`, `testsBasePath`. Like other Karma Test Explorer settings, when not explicitly configured, most settings will be auto-detected where possible with reasonable values for each project workspace",
"type": "array",
"scope": "resource",
"default": [],
"items": {
"uniqueItems": true,
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"required": [
"projectRootPath"
"rootPath"
],
"properties": {
"projectRootPath": {
"markdownDescription": "The path to the folder containing the project for testing (relative to the workspace root folder)",
"markdownDescription": "This setting has been renamed to `rootPath`. Please update your setting to use the new name.",
"deprecationMessage": "Rename this setting to `rootPath`",
"markdownDeprecationMessage": "Rename this setting to `rootPath`",
"type": "string",
"scope": "resource"
},
"rootPath": {
"markdownDescription": "The path to the folder containing the project worspace for testing (relative to the VS Code workspace root folder)",
"type": "string",
"scope": "resource"
},
Expand All @@ -542,7 +613,7 @@
]
},
"karmaConfFilePath": {
"markdownDescription": "The path where the `karma.conf.js` file is located (relative to the project root path)",
"markdownDescription": "The path where the `karma.conf.js` file is located (relative to the project workspace root path)",
"type": "string",
"scope": "resource"
},
Expand All @@ -562,24 +633,26 @@
]
},
"testFiles": {
"markdownDescription": "The path glob patterns identifying the test files (relative to the project root path)",
"markdownDescription": "The path glob patterns identifying the test files (relative to the project workspace root path)",
"type": "array",
"items": {
"type": "string"
"type": "string",
"uniqueItems": true
},
"scope": "resource",
"minItems": 1
},
"excludeFiles": {
"markdownDescription": "The path glob patterns identifying files to be excluded from `testFiles` (relative to the project root path). The `node_modules` folder is always excluded",
"markdownDescription": "The path glob patterns identifying files to be excluded from `testFiles` (relative to the project workspace root path). The `node_modules` folder is always excluded",
"type": "array",
"items": {
"type": "string"
"type": "string",
"uniqueItems": true
},
"scope": "resource"
},
"testsBasePath": {
"markdownDescription": "The base folder containing the test files (relative to the project root path for Karma projects, or the project `root` path specified in `angular.json` for Angular workspace projects). If not specified, defaults to the longest common path of the tests discovered in the project",
"markdownDescription": "The base folder containing the test files (relative to the project workspace root path for Karma projects, or the project `root` path specified in `angular.json` for Angular workspace projects). If not specified, defaults to the longest common path of the tests discovered in the project",
"type": "string",
"scope": "resource"
}
Expand Down
Loading