@@ -115,10 +115,10 @@ test('postFile empty', async () => {
115
115
} ) ;
116
116
} ) ;
117
117
118
- test ( 'postFile file' , async ( ) => {
118
+ test ( 'postFile file (string) ' , async ( ) => {
119
119
expect (
120
120
await api . post ( '/postFile' , {
121
- files : [ { fileName : 'out.txt' , rawBuffer : Buffer . from ( 'Hello' ) } ] ,
121
+ files : [ { fileName : 'out.txt' , fileData : 'Hello' } ] ,
122
122
} ) ,
123
123
) . toStrictEqual ( {
124
124
body : [
@@ -133,7 +133,7 @@ test('postFile file', async () => {
133
133
test ( 'postFile file and JSON' , async ( ) => {
134
134
expect (
135
135
await api . post ( '/postFile' , {
136
- files : [ { fileName : 'out.txt' , rawBuffer : Buffer . from ( 'Hello' ) } ] ,
136
+ files : [ { fileName : 'out.txt' , fileData : Buffer . from ( 'Hello' ) } ] ,
137
137
body : { foo : 'bar' } ,
138
138
} ) ,
139
139
) . toStrictEqual ( {
@@ -153,8 +153,8 @@ test('postFile files and JSON', async () => {
153
153
expect (
154
154
await api . post ( '/postFile' , {
155
155
files : [
156
- { fileName : 'out.txt' , rawBuffer : Buffer . from ( 'Hello' ) } ,
157
- { fileName : 'out.txt' , rawBuffer : Buffer . from ( 'Hi' ) } ,
156
+ { fileName : 'out.txt' , fileData : Buffer . from ( 'Hello' ) } ,
157
+ { fileName : 'out.txt' , fileData : Buffer . from ( 'Hi' ) } ,
158
158
] ,
159
159
body : { files : [ { id : 0 , description : 'test' } ] } ,
160
160
} ) ,
@@ -178,7 +178,7 @@ test('postFile files and JSON', async () => {
178
178
test ( 'postFile sticker and JSON' , async ( ) => {
179
179
expect (
180
180
await api . post ( '/postFile' , {
181
- files : [ { key : 'file' , fileName : 'sticker.png' , rawBuffer : Buffer . from ( 'Sticker' ) } ] ,
181
+ files : [ { key : 'file' , fileName : 'sticker.png' , fileData : Buffer . from ( 'Sticker' ) } ] ,
182
182
body : { foo : 'bar' } ,
183
183
appendToFormData : true ,
184
184
} ) ,
0 commit comments