Skip to content

Commit f03b068

Browse files
authored
[storage][test] remove IE11/Edge workaround (Azure#25250)
1 parent 03478a4 commit f03b068

File tree

5 files changed

+5
-25
lines changed

5 files changed

+5
-25
lines changed

sdk/storage/storage-blob/test/utils/index.browser.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,7 @@ export function getBrowserFile(name: string, size: number): File {
181181
uint8Arr[j] = Math.floor(Math.random() * 256);
182182
}
183183

184-
// IE11 & Edge doesn't support create File using var file = new File([binary], name);
185-
// We leverage Blob() to mock a File
186-
187-
const file = new Blob([uint8Arr]) as any;
188-
file.name = name;
189-
return file;
184+
return new File([uint8Arr], name);
190185
}
191186

192187
export function getSASConnectionStringFromEnvironment(): string {

sdk/storage/storage-file-datalake/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
4848
"generate:client": "autorest --typescript ./swagger/README.md",
4949
"integration-test:browser": "dev-tool run test:browser",
50-
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/storage-file-datalake/test/**/*.spec.js'",
50+
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/storage-file-datalake/test/*.spec.js' 'dist-esm/storage-file-datalake/test/node/*.spec.js'",
5151
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
5252
"lint:fix": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js --fix",
5353
"lint": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js",

sdk/storage/storage-file-datalake/test/utils/index.browser.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,7 @@ export function getBrowserFile(name: string, size: number): File {
153153
uint8Arr[j] = Math.floor(Math.random() * 256);
154154
}
155155

156-
// IE11 & Edge doesn't support create File using var file = new File([binary], name);
157-
// We leverage Blob() to mock a File
158-
159-
const file = new Blob([uint8Arr]) as any;
160-
file.name = name;
161-
return file;
156+
return new File([uint8Arr], name);
162157
}
163158

164159
export function getSASConnectionStringFromEnvironment(): string {

sdk/storage/storage-file-share/test/utils/index.browser.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,7 @@ export function getBrowserFile(name: string, size: number): File {
114114
uint8Arr[j] = Math.floor(Math.random() * 256);
115115
}
116116

117-
// IE11 & Edge doesn't support create File using var file = new File([binary], name);
118-
// We leverage Blob() to mock a File
119-
120-
const file = new Blob([uint8Arr]) as any;
121-
file.name = name;
122-
return file;
117+
return new File([uint8Arr], name);
123118
}
124119

125120
export function getSASConnectionStringFromEnvironment(): string {

sdk/storage/storage-queue/test/utils/index.browser.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,7 @@ export function getBrowserFile(name: string, size: number): File {
109109
uint8Arr[j] = Math.floor(Math.random() * 256);
110110
}
111111

112-
// IE11 & Edge doesn't support create File using var file = new File([binary], name);
113-
// We leverage Blob() to mock a File
114-
115-
const file = new Blob([uint8Arr]) as any;
116-
file.name = name;
117-
return file;
112+
return new File([uint8Arr], name);
118113
}
119114

120115
export function getSASConnectionStringFromEnvironment(): string {

0 commit comments

Comments
 (0)