Skip to content

Commit 2b0d381

Browse files
committed
Removing the try catch block from the test case
1 parent d8a1ff9 commit 2b0d381

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

spec/development/workload/OneNote.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,15 @@ describe("OneNote", function() {
8282
});
8383

8484
it("Create a OneNote page with application/xhtml+xml page content", async () => {
85-
try {
86-
const body = "<!DOCTYPE html><html><head><title>A page with a block of HTML</title></head><body><p>This page contains some <i>formatted</i> <b>text</b>.</p></body></html>";
87-
const json = await client
88-
.api(`/me/onenote/sections/${section.id}/pages`)
89-
.header("content-type", "application/xhtml+xml")
90-
.post(body);
91-
const createdPageFromHTML = json as OnenotePage;
92-
assert.isDefined(createdPage.id);
93-
assert.isDefined(createdPage.contentUrl);
94-
assert.isUndefined(createdPage["random fake property that should be null"]);
95-
} catch (error) {
96-
throw error;
97-
}
85+
const body = "<!DOCTYPE html><html><head><title>A page with a block of HTML</title></head><body><p>This page contains some <i>formatted</i> <b>text</b>.</p></body></html>";
86+
const json = await client
87+
.api(`/me/onenote/sections/${section.id}/pages`)
88+
.header("content-type", "application/xhtml+xml")
89+
.post(body);
90+
const createdPageFromHTML = json as OnenotePage;
91+
assert.isDefined(createdPage.id);
92+
assert.isDefined(createdPage.contentUrl);
93+
assert.isUndefined(createdPage["random fake property that should be null"]);
9894
});
9995

10096
it("create a OneNote page with html page content and file attachment", async () => {

0 commit comments

Comments
 (0)