Skip to content

Conversation

@DanTup
Copy link
Member

@DanTup DanTup commented Aug 6, 2019

Fixes #1901.

  • Requires tests!

This allows you to mark launch configs as templates for tests:

"configurations": [
	{
		"name": "Dart",
		"program": "bin/main.dart",
		"request": "launch",
		"type": "dart",
	},
	{
		"name": "Run in Browser",
		"request": "launch",
		"type": "dart",
		"template": "run-test",
		"env": {
			"MY_VAR": "Yay!"
		}
	},
	{
		"name": "Debug in Browser",
		"request": "launch",
		"type": "dart",
		"template": "debug-test",
		"env": {
			"MY_VAR": "Yay!"
		}
	}
]

Then they'll show up as code-lens links:

Screenshot 2019-08-06 at 5 23 29 pm

(Note: the names here are just examples - this doesn't do anything with testing on browsers - it's up to a user to pass through some arguments or environment variables in the config and then handle them as required in their tests).

@DanTup DanTup added is enhancement in testing Relates to test execution of Dart/Flutter tests for end users labels Aug 6, 2019
@DanTup DanTup added this to the v3.4.0 milestone Aug 6, 2019
@DanTup DanTup force-pushed the custom-test-codelens branch from 7786308 to 3db6b5e Compare August 19, 2019 16:53
@DanTup DanTup merged commit 1d8d3df into master Aug 20, 2019
@DanTup DanTup deleted the custom-test-codelens branch August 20, 2019 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in testing Relates to test execution of Dart/Flutter tests for end users is enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug configurations for tests

2 participants