mirror of
https://github.com/directus/directus.git
synced 2026-01-13 22:18:08 -05:00
* Fix options for list & map interfaces * Create short-boxes-rescue.md * Outsource Vue component check to utils * No need for explicit comparation * Depend on `typeof` instead of `instanceof` to check Vue comp Co-authored-by: Brainslug <br41nslug@users.noreply.github.com> * make linter happy --------- Co-authored-by: Brainslug <br41nslug@users.noreply.github.com> Co-authored-by: Brainslug <tim@brainslug.nl>
17 lines
469 B
TypeScript
17 lines
469 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { isObject } from './is-object.js';
|
|
|
|
describe('isObject', () => {
|
|
it.each([{}, { exampleProp: 1 }])('returns true if input is an object', (input) => {
|
|
const result = isObject(input);
|
|
|
|
expect(result).toEqual(true);
|
|
});
|
|
|
|
it.each([null, [], undefined, 'string', 1, () => ({})])('returns false if input is not an object', (input) => {
|
|
const result = isObject(input);
|
|
|
|
expect(result).toEqual(false);
|
|
});
|
|
});
|