React 18 and Vite (#4510)

This commit is contained in:
Matthew Penner 2022-11-25 13:25:03 -07:00 committed by GitHub
parent 1bb1b13f6d
commit 21613fa602
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
244 changed files with 4547 additions and 8933 deletions

View file

@ -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);
},
);
});
});