1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { filterGroupActionSet, projectActionSet, readOnlyProjectActionSet } from "./project-action-set";
7 describe('project-action-set', () => {
8 const flattProjectActionSet = projectActionSet.reduce((prev, next) => prev.concat(next), []);
9 const flattReadOnlyProjectActionSet = readOnlyProjectActionSet.reduce((prev, next) => prev.concat(next), []);
10 const flattFilterGroupActionSet = filterGroupActionSet.reduce((prev, next) => prev.concat(next), []);
12 describe('projectActionSet', () => {
13 it('should not be empty', () => {
15 expect(flattProjectActionSet.length).toBeGreaterThan(0);
18 it('should contain readOnlyProjectActionSet items', () => {
20 expect(flattProjectActionSet)
21 .toEqual(expect.arrayContaining(flattReadOnlyProjectActionSet));
25 describe('readOnlyProjectActionSet', () => {
26 it('should not be empty', () => {
28 expect(flattReadOnlyProjectActionSet.length).toBeGreaterThan(0);
31 it('should not contain projectActionSet items', () => {
33 expect(flattReadOnlyProjectActionSet)
34 .not.toEqual(expect.arrayContaining(flattProjectActionSet));
38 describe('filterGroupActionSet', () => {
39 it('should not be empty', () => {
41 expect(flattFilterGroupActionSet.length).toBeGreaterThan(0);
44 it('should not contain projectActionSet items', () => {
46 expect(flattFilterGroupActionSet)
47 .not.toEqual(expect.arrayContaining(flattProjectActionSet));