1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { collectionActionSet, readOnlyCollectionActionSet } from "./collection-action-set";
7 describe('collection-action-set', () => {
8 const flattCollectionActionSet = collectionActionSet.reduce((prev, next) => prev.concat(next), []);
9 const flattReadOnlyCollectionActionSet = readOnlyCollectionActionSet.reduce((prev, next) => prev.concat(next), []);
10 describe('collectionActionSet', () => {
11 it('should not be empty', () => {
13 expect(flattCollectionActionSet.length).toBeGreaterThan(0);
16 it('should contain readOnlyCollectionActionSet items', () => {
18 expect(flattCollectionActionSet)
19 .toEqual(expect.arrayContaining(flattReadOnlyCollectionActionSet));
23 describe('readOnlyCollectionActionSet', () => {
24 it('should not be empty', () => {
26 expect(flattReadOnlyCollectionActionSet.length).toBeGreaterThan(0);
29 it('should not contain collectionActionSet items', () => {
31 expect(flattReadOnlyCollectionActionSet)
32 .not.toEqual(expect.arrayContaining(flattCollectionActionSet));