Skip to content

Commit 0a03861

Browse files
Set featureFlag default to null so that it can be resolved by settings (#1838)
* set featureFlag default to null so that it can be resolved by settings * added tests
1 parent 4274341 commit 0a03861

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@
738738
},
739739
"powershell.developer.featureFlags": {
740740
"type": "array",
741-
"default": [],
741+
"default": null,
742742
"description": "An array of strings that enable experimental features in the PowerShell extension."
743743
},
744744
"powershell.developer.powerShellExeIsWindowsDevBuild": {

test/settings.test.ts

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*---------------------------------------------------------
2+
* Copyright (C) Microsoft Corporation. All rights reserved.
3+
*--------------------------------------------------------*/
4+
5+
import * as assert from "assert";
6+
import Settings = require("../src/settings");
7+
8+
suite("Settings module", () => {
9+
test("Settings load without error", () => {
10+
assert.doesNotThrow(Settings.load);
11+
});
12+
13+
// TODO: Remove this test when PSReadLine is in stable
14+
test("PSReadLine featureFlag set correctly", () => {
15+
const settings: Settings.ISettings = Settings.load();
16+
if (process.platform === "win32") {
17+
assert.deepEqual(settings.developer.featureFlags, ["PSReadLine"]);
18+
} else {
19+
assert.deepEqual(settings.developer.featureFlags, []);
20+
}
21+
});
22+
});

0 commit comments

Comments
 (0)