React 18 and Vite (#4510)
This commit is contained in:
parent
1bb1b13f6d
commit
21613fa602
244 changed files with 4547 additions and 8933 deletions
|
@ -1,22 +1,24 @@
|
|||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import { isObject } from '@/lib/objects';
|
||||
|
||||
describe('@/lib/objects.ts', function () {
|
||||
describe('isObject()', function () {
|
||||
it('should return true for objects', function () {
|
||||
expect(isObject({})).toBe(true);
|
||||
expect(isObject({ foo: 123 })).toBe(true);
|
||||
expect(isObject(Object.freeze({}))).toBe(true);
|
||||
describe('@/lib/objects.ts', () => {
|
||||
describe('isObject()', () => {
|
||||
it('should return true for objects', () => {
|
||||
expect(isObject({})).equals(true);
|
||||
expect(isObject({ foo: 123 })).equals(true);
|
||||
expect(isObject(Object.freeze({}))).equals(true);
|
||||
});
|
||||
|
||||
it('should return false for null', function () {
|
||||
expect(isObject(null)).toBe(false);
|
||||
it('should return false for null', () => {
|
||||
expect(isObject(null)).equals(false);
|
||||
});
|
||||
|
||||
it.each([undefined, 123, 'foobar', () => ({}), Function, String(123), isObject, () => null, [], [1, 2, 3]])(
|
||||
'should return false for %p',
|
||||
function (value) {
|
||||
expect(isObject(value)).toBe(false);
|
||||
}
|
||||
value => {
|
||||
expect(isObject(value)).equals(false);
|
||||
},
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue