diff options
Diffstat (limited to 'modules/test/test-webdav-sizes.js')
| -rw-r--r-- | modules/test/test-webdav-sizes.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/test/test-webdav-sizes.js b/modules/test/test-webdav-sizes.js index 68cb90b..9085f23 100644 --- a/modules/test/test-webdav-sizes.js +++ b/modules/test/test-webdav-sizes.js @@ -229,6 +229,7 @@ const said = (out, re) => out.some(o => re.test(o.msg)); // for a 3 GB file) and must not print 'NaN MB' for a missing size. ok('A14a 2 GiB renders as GB', WebDAVModule.prototype._formatSize.call(null, 2 * 1024 * 1024 * 1024) === '2.0 GB', WebDAVModule.prototype._formatSize.call(null, 2 * 1024 * 1024 * 1024)); ok('A14b undefined does not render NaN', WebDAVModule.prototype._formatSize.call(null, undefined) === '—', WebDAVModule.prototype._formatSize.call(null, undefined)); + ok('A14d null renders as unknown, not 0 B', WebDAVModule.prototype._formatSize.call(null, null) === '—', WebDAVModule.prototype._formatSize.call(null, null)); ok('A14c 0 bytes is still B', WebDAVModule.prototype._formatSize.call(null, 0) === '0 B', WebDAVModule.prototype._formatSize.call(null, 0)); console.log('test-webdav-sizes: ' + passes + ' passed, ' + fails + ' failed'); |