File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
spec/development/workload Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff 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 ( ) => {
You can’t perform that action at this time.
0 commit comments