Skip to content

Commit 97be1a7

Browse files
committed
Update deprecated usages of assert module
1 parent 1b41a07 commit 97be1a7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

test/features/CustomViews.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ hello
129129
styleSheetPaths: cssPaths,
130130
};
131131
try {
132-
assert.equal(htmlContentView.getContent(), testCase.expectedHtmlString);
132+
assert.strictEqual(htmlContentView.getContent(), testCase.expectedHtmlString);
133133
} finally {
134134
jsPaths.forEach((jsPath) => fs.unlinkSync(vscode.Uri.parse(jsPath).fsPath));
135135
cssPaths.forEach((cssPath) => fs.unlinkSync(vscode.Uri.parse(cssPath).fsPath));

test/features/ISECompatibility.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,32 @@ suite("ISECompatibility feature", () => {
1414
await vscode.commands.executeCommand("PowerShell.EnableISEMode");
1515
for (const iseSetting of ISECompatibilityFeature.settings) {
1616
const currently = vscode.workspace.getConfiguration(iseSetting.path).get(iseSetting.name);
17-
assert.equal(currently, iseSetting.value);
17+
assert.strictEqual(currently, iseSetting.value);
1818
}
1919
});
2020

2121
test("It unsets ISE Settings", async () => {
2222
// Change state to something that DisableISEMode will change
2323
await vscode.workspace.getConfiguration("workbench").update("colorTheme", "PowerShell ISE", true);
24-
assert.equal(vscode.workspace.getConfiguration("workbench").get("colorTheme"), "PowerShell ISE");
24+
assert.strictEqual(vscode.workspace.getConfiguration("workbench").get("colorTheme"), "PowerShell ISE");
2525

2626
await vscode.commands.executeCommand("PowerShell.DisableISEMode");
2727
for (const iseSetting of ISECompatibilityFeature.settings) {
2828
const currently = vscode.workspace.getConfiguration(iseSetting.path).get(iseSetting.name);
29-
assert.notEqual(currently, iseSetting.value);
29+
assert.notStrictEqual(currently, iseSetting.value);
3030
}
3131
}).timeout(10000);
3232

3333
test("It leaves Theme after being changed after enabling ISE Mode", async () => {
3434
await vscode.commands.executeCommand("PowerShell.EnableISEMode");
35-
assert.equal(vscode.workspace.getConfiguration("workbench").get("colorTheme"), "PowerShell ISE");
35+
assert.strictEqual(vscode.workspace.getConfiguration("workbench").get("colorTheme"), "PowerShell ISE");
3636

3737
await vscode.workspace.getConfiguration("workbench").update("colorTheme", "Dark+", true);
3838
await vscode.commands.executeCommand("PowerShell.DisableISEMode");
3939
for (const iseSetting of ISECompatibilityFeature.settings) {
4040
const currently = vscode.workspace.getConfiguration(iseSetting.path).get(iseSetting.name);
41-
assert.notEqual(currently, iseSetting.value);
41+
assert.notStrictEqual(currently, iseSetting.value);
4242
}
43-
assert.equal(vscode.workspace.getConfiguration("workbench").get("colorTheme"), "Dark+");
43+
assert.strictEqual(vscode.workspace.getConfiguration("workbench").get("colorTheme"), "Dark+");
4444
}).timeout(10000);
4545
});

test/features/RunCode.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ suite("RunCode tests", () => {
3636

3737
const actual: object = createLaunchConfig(LaunchType.Debug, commandToRun, args);
3838

39-
assert.deepEqual(actual, expected);
39+
assert.deepStrictEqual(actual, expected);
4040
});
4141

4242
test("Can run Pester tests from file", async () => {

0 commit comments

Comments
 (0)