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

Code Lens doesn't appear on test function #2539

Closed
BootBlock opened this issue Jun 9, 2020 · 1 comment
Closed

Code Lens doesn't appear on test function #2539

BootBlock opened this issue Jun 9, 2020 · 1 comment
Labels
in editor Relates to code editing or language features is bug
Milestone

Comments

@BootBlock
Copy link
Contributor

image

{
	"event": "analysis.outline",
	"params": {
		"file": "P:\\Source\\GitHub\\DartTest\\test\\debug_test.dart",
		"kind": "LIBRARY",
		"outline": {
			"element": {
				"kind": "COMPILATION_UNIT",
				"name": "<unit>",
				"location": {
					"file": "P:\\Source\\GitHub\\DartTest\\test\\debug_test.dart",
					"offset": 0,
					"length": 147,
					"startLine": 1,
					"startColumn": 1
				},
				"flags": 0
			},
			"offset": 0,
			"length": 147,
			"codeOffset": 0,
			"codeLength": 147,
			"children": [
				{
					"element": {
						"kind": "FUNCTION",
						"name": "main",
						"location": {
							"file": "P:\\Source\\GitHub\\DartTest\\test\\debug_test.dart",
							"offset": 36,
							"length": 4,
							"startLine": 3,
							"startColumn": 1
						},
						"flags": 8,
						"parameters": "()",
						"returnType": ""
					},
					"offset": 36,
					"length": 108,
					"codeOffset": 36,
					"codeLength": 108,
					"children": [
						{
							"element": {
								"kind": "UNIT_TEST_TEST",
								"name": "test(\"description\")",
								"location": {
									"file": "P:\\Source\\GitHub\\DartTest\\test\\debug_test.dart",
									"offset": 48,
									"length": 4,
									"startLine": 4,
									"startColumn": 3
								},
								"flags": 0
							},
							"offset": 48,
							"length": 92,
							"codeOffset": 48,
							"codeLength": 92
						}
					]
				}
			]
		}
	}
}
@DanTup DanTup added this to the v3.13.0 milestone Jun 25, 2020
@DanTup DanTup added in editor Relates to code editing or language features is bug labels Jun 25, 2020
@DanTup
Copy link
Member

DanTup commented Jul 13, 2020

Figured out how to repro this... Create the file before you have a pupspec, and we "cache" that the file is not pub-runnable. Then you add a pubspec and package:test and it uses the cached value still.

@DanTup DanTup closed this as completed in bf47542 Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features is bug
Projects
None yet
Development

No branches or pull requests

2 participants