insomnia/packages/insomnia-app/app/common/__tests__/strings.test.ts

19 lines
627 B
TypeScript
Raw Normal View History

import * as models from '../../models';
import { WorkspaceScopeKeys } from '../../models/workspace';
2021-07-22 23:04:56 +00:00
import { getWorkspaceLabel } from '../get-workspace-label';
import { strings } from '../strings';
describe('getWorkspaceLabel', () => {
it('should return document label', () => {
const w = models.workspace.init();
w.scope = WorkspaceScopeKeys.design;
expect(getWorkspaceLabel(w)).toBe(strings.document);
});
it('should return collection label', () => {
const w = models.workspace.init();
w.scope = WorkspaceScopeKeys.collection;
expect(getWorkspaceLabel(w)).toBe(strings.collection);
});
});