Add test for Stickers.redactPackId

This commit is contained in:
Evan Hahn 2020-08-17 14:59:46 -05:00 committed by Josh Perez
parent cebe72ece7
commit 3b05e9ad8f
2 changed files with 15 additions and 0 deletions

View file

@ -385,6 +385,7 @@
<script type="text/javascript" src="database_test.js"></script>
<script type="text/javascript" src="i18n_test.js"></script>
<script type="text/javascript" src="protobuf_test.js"></script>
<script type="text/javascript" src="stickers_test.js"></script>
<!-- Comment out to turn off code coverage. Useful for getting real callstacks. -->
<!-- NOTE: blanket doesn't support modern syntax and will choke until we find a replacement. :0( -->

14
test/stickers_test.js Normal file
View file

@ -0,0 +1,14 @@
/* global Signal */
const { Stickers } = Signal;
describe('Stickers', () => {
describe('redactPackId', () => {
it('redacts pack IDs', () => {
assert.strictEqual(
Stickers.redactPackId('b9439fa5fdc8b9873fe64f01b88b8ccf'),
'[REDACTED]ccf'
);
});
});
});