You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Keep all previously approved widget capabilities when requesting new capabilities (#7340)
This commit is contained in:
@ -14,9 +14,20 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { iterableDiff, iterableUnion } from "../../src/utils/iterables";
|
||||
import { iterableDiff, iterableMerge, iterableUnion } from "../../src/utils/iterables";
|
||||
|
||||
describe('iterables', () => {
|
||||
describe('iterableMerge', () => {
|
||||
it('should return a merged array', () => {
|
||||
const a = [1, 2, 3];
|
||||
const b = [1, 2, 4]; // note diff
|
||||
const result = iterableMerge(a, b);
|
||||
expect(result).toBeDefined();
|
||||
expect(result).toHaveLength(4);
|
||||
expect(result).toEqual([1, 2, 3, 4]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('iterableUnion', () => {
|
||||
it('should return a union', () => {
|
||||
const a = [1, 2, 3];
|
||||
|
Reference in New Issue
Block a user