mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-20 00:18:45 +01:00
Convert CallingHeader texts to toasts
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { isEqual, remove, toggle } from '../../util/setUtil';
|
||||
import { difference, isEqual, remove, toggle } from '../../util/setUtil';
|
||||
|
||||
describe('set utilities', () => {
|
||||
const original = new Set([1, 2, 3]);
|
||||
@@ -82,4 +82,21 @@ describe('set utilities', () => {
|
||||
assert.deepStrictEqual(original, new Set([1, 2, 3]));
|
||||
});
|
||||
});
|
||||
|
||||
describe('difference', () => {
|
||||
it('returns the difference of two sets', () => {
|
||||
assert.deepStrictEqual(
|
||||
difference(new Set(['a', 'b', 'c']), new Set(['a', 'b', 'c'])),
|
||||
new Set()
|
||||
);
|
||||
assert.deepStrictEqual(
|
||||
difference(new Set(['a', 'b', 'c']), new Set([])),
|
||||
new Set(['a', 'b', 'c'])
|
||||
);
|
||||
assert.deepStrictEqual(
|
||||
difference(new Set(['a', 'b', 'c']), new Set(['d'])),
|
||||
new Set(['a', 'b', 'c'])
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user