(bytes)
| 38 | const TEST_HASH_SPLITTER = '__'; |
| 39 | |
| 40 | function convertBytes(bytes) { |
| 41 | const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'] |
| 42 | if (bytes == 0) { |
| 43 | return 'N/A'; |
| 44 | } |
| 45 | const i = Math.floor(Math.log(bytes) / Math.log(1024)); |
| 46 | return (bytes / Math.pow(1024, i)).toFixed(Math.min(1, i)) + ' ' + sizes[i] |
| 47 | } |
| 48 | class Test { |
| 49 | constructor(fileUrl) { |
| 50 | this.fileUrl = fileUrl; |