UNPKG

@datalayer/core

Version:

[![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)

26 lines (25 loc) 918 B
/* * Copyright (c) 2023-2025 Datalayer, Inc. * Distributed under the terms of the Modified BSD License. */ import { uniqueNamesGenerator, names } from 'unique-names-generator'; import { newUlid } from '../../utils'; import { newUserMock } from './UserMock'; export const newSpaceMock = (name) => { const space = { id: newUlid(), owner: newUserMock(uniqueNamesGenerator({ dictionaries: [names] }), uniqueNamesGenerator({ dictionaries: [names] })), handle: newUlid(), type: 'space', variant: 'default', name: name, description: name + ' description.', public: false, creationDate: new Date(), }; return space; }; export const SPACE_1_MOCK = newSpaceMock('Space 1'); export const SPACE_2_MOCK = newSpaceMock('Space 2'); export const SPACE_3 = newSpaceMock('Space 3'); export const SPACES_MOCK = [SPACE_1_MOCK, SPACE_2_MOCK, SPACE_3];