mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
adding unit test for truncation issue #328
This commit is contained in:
parent
14d4226173
commit
c76957b3cb
15
js/test/Truncation.js
Normal file
15
js/test/Truncation.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
'use strict';
|
||||||
|
var common = require('../common');
|
||||||
|
|
||||||
|
describe('Compression', function () {
|
||||||
|
it('does not truncate messages', function () {
|
||||||
|
var message = fs.readFileSync('test/compression-sample.txt', 'utf8');
|
||||||
|
assert.strictEqual(
|
||||||
|
message,
|
||||||
|
Base64.btou( RawDeflate.inflate(
|
||||||
|
RawDeflate.deflate( Base64.utob(message) )
|
||||||
|
) )
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
1910
js/test/compression-sample.txt
Normal file
1910
js/test/compression-sample.txt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user