File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ describe('setDocument', () => {
84
84
85
85
await client . setDocument ( {
86
86
documentID : newDocument . documentID ,
87
- id : newDocument . id , // diagram ID
88
87
projectID : newDocument . projectID ,
89
88
title : "@mermaidchart/sdk E2E test diagram" ,
90
89
code,
@@ -106,8 +105,8 @@ describe('setDocument', () => {
106
105
107
106
await expect ( client . setDocument ( {
108
107
documentID : newDocument . documentID ,
109
- // @ts -expect-error not setting diagram `id ` should throw an error
110
- id : null ,
108
+ // @ts -expect-error not setting diagram `projectID ` should throw an error
109
+ projectID : null ,
111
110
} ) ) . rejects . toThrowError ( "400" ) ; // should throw HTTP 400 error
112
111
} ) ;
113
112
} ) ;
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ export class MermaidChart {
210
210
* @param document The document to update.
211
211
*/
212
212
public async setDocument (
213
- document : Pick < MCDocument , 'id' | ' documentID' | 'projectID' > & Partial < MCDocument > ,
213
+ document : Pick < MCDocument , 'documentID' | 'projectID' > & Partial < MCDocument > ,
214
214
) {
215
215
const { data} = await this . axios . put < { result : "ok" } | { result : "failed" , error : any } > (
216
216
URLS . rest . documents . pick ( document ) . self ,
You can’t perform that action at this time.
0 commit comments