mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 17:35:44 +01:00
14 lines
350 B
TypeScript
14 lines
350 B
TypeScript
|
import { fromTuple } from '@/misc/from-tuple.js';
|
||
|
|
||
|
describe(fromTuple, () => {
|
||
|
it('should return value when value is not an array', () => {
|
||
|
const value = fromTuple('abc');
|
||
|
expect(value).toBe('abc');
|
||
|
});
|
||
|
|
||
|
it('should return first element when value is an array', () => {
|
||
|
const value = fromTuple(['abc']);
|
||
|
expect(value).toBe('abc');
|
||
|
});
|
||
|
});
|