mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
12 lines
412 B
TypeScript
12 lines
412 B
TypeScript
import { formatAccessText } from 'utils/formatAccessText';
|
|
|
|
test('formatAccessText with access', () => {
|
|
expect(formatAccessText(true)).toEqual(undefined);
|
|
expect(formatAccessText(true, 'Foo')).toEqual('Foo');
|
|
});
|
|
|
|
test('formatAccessText without access', () => {
|
|
expect(formatAccessText(false)).toEqual('Access denied');
|
|
expect(formatAccessText(false, 'Foo')).toEqual(`Foo (Access denied)`);
|
|
});
|