Skip to content

Commit 9e63867

Browse files
v-czgv-czg
v-czg
authored and
v-czg
committed
improve test cases
1 parent de6072b commit 9e63867

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

test/boardmanager.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ suite("Arduino: Board Manager.", () => {
130130
const packagePath = Path.join(arduinoSettings.packagePath, "packages", "Microsoft");
131131
if (util.directoryExistsSync(packagePath)) {
132132
ArduinoContext.arduinoApp.uninstallBoard("Microsoft", packagePath);
133-
if (util.directoryExistsSync(packagePath)) {
134-
assert.fail(true, false, "Package path still exist after calling uninstall package,remove the board package failure", "");
135-
}
133+
assert.equal(util.directoryExistsSync(packagePath), false,
134+
"Package path still exist after calling uninstall package,remove the board package failure");
136135
}
137136
} catch (error) {
138137
assert.fail(true, false, new Error(error).message, new Error(error).name);

test/librarymanager.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ suite("Arduino: Library Manager.", () => {
9898

9999
if (util.directoryExistsSync(libPath)) {
100100
ArduinoContext.arduinoApp.uninstallLibrary("AzureIoTHub", libPath);
101-
if (util.directoryExistsSync(libPath)) {
102-
assert.fail(true, false, "Library path still exist after calling uninstall library,remove the library failure", "");
103-
}
101+
assert.equal(util.directoryExistsSync(libPath), false,
102+
"Library path still exist after calling uninstall library,remove the library failure");
104103
}
105104

106105
} catch (error) {

0 commit comments

Comments
 (0)