Files
wehub-resource-sync 2d398e1894
Deploy Github Pages / deploy (push) Failing after 1s
chore: import upstream snapshot with attribution
2026-07-13 12:30:43 +08:00

16 lines
628 B
TypeScript

import { isPlainObject } from '../src/helpers';
describe('helpers/assert', () => {
it('isPlainObject', () => {
expect(isPlainObject({})).toBeTruthy(); // true
expect(isPlainObject({ aaa: 'aaa' })).toBeTruthy(); // true
expect(isPlainObject([])).toBeFalsy(); // false
expect(isPlainObject(null)).toBeFalsy(); // false
expect(isPlainObject(new Date())).toBeFalsy(); // false
expect(isPlainObject(/regex/)).toBeFalsy(); // false
expect(isPlainObject(123)).toBeFalsy(); // false
expect(isPlainObject('string')).toBeFalsy(); // false
expect(isPlainObject(true)).toBeFalsy(); // false
});
});