Skip to content

Commit d8a1ff9

Browse files
committed
Removing the try catch block from the test case
1 parent 36b0cc9 commit d8a1ff9

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

spec/development/workload/OneNote.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,15 @@ describe("OneNote", function() {
7070
}
7171
});
7272
it("Create a OneNote page with html page content", async () => {
73-
try {
74-
const formData = new FormData();
75-
formData.append("Presentation", fs.createReadStream("./spec/sample_files/onenotepage.html"));
76-
const json = await client.api(`/me/onenote/sections/${section.id}/pages`).post(formData);
77-
const createdPageFromHTML = json as OnenotePage;
73+
const formData = new FormData();
74+
formData.append("Presentation", fs.createReadStream("./spec/sample_files/onenotepage.html"));
75+
const json = await client.api(`/me/onenote/sections/${section.id}/pages`).post(formData);
76+
const createdPageFromHTML = json as OnenotePage;
7877

79-
assert.isDefined(createdPage.id);
80-
assert.isDefined(createdPage.contentUrl);
81-
assert.equal("New Page", createdPageFromHTML.title);
82-
assert.isUndefined(createdPage["random fake property that should be null"]);
83-
} catch (error) {
84-
throw error;
85-
}
78+
assert.isDefined(createdPage.id);
79+
assert.isDefined(createdPage.contentUrl);
80+
assert.equal("New Page", createdPageFromHTML.title);
81+
assert.isUndefined(createdPage["random fake property that should be null"]);
8682
});
8783

8884
it("Create a OneNote page with application/xhtml+xml page content", async () => {

0 commit comments

Comments
 (0)