Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

test script only checks for .vscode-test folder but not actual Code executable #94

Closed
@DanTup

Description

@DanTup

In the test script, the check for whether to download Code is just based on the folder existing:

var testRunFolder = '.vscode-test';
var testRunFolderAbsolute = path.join(process.cwd(), testRunFolder);

/// ...

fs.exists(testRunFolderAbsolute, function (exists) {
	if (exists) {
		runTests();
	} else {
		downloadExecutableAndRunTests();
	}
});

This means that if you want to run your tests against both stable and insiders you can't. eg. I have a wrapper that spawns the test script after setting env vars like this:

runTests("flutter");
runTests("flutter", "insiders");

The insiders run fails, because the first run downloads stable into .vscode-test and then the insider run assumes the insiders executable is in there.

I think the fix may relatively simple, moving the var executable decleration up outside of the runTests function and then change the exists to use that instead of the folder.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions