first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import { isControlled } from './controlled';
describe('isControlled', function () {
it('returns false if no value provided', function () {
expect(isControlled({}, 'value')).toBe(false);
});
it('returns false if value is undefined', function () {
expect(isControlled({ value: undefined }, 'value')).toBe(false);
});
it('returns false if value is null', function () {
expect(isControlled({ value: null }, 'value')).toBe(false);
});
it('returns true if value is empty string', function () {
expect(isControlled({ value: '' }, 'value')).toBe(true);
});
it('returns true if value is 0', function () {
expect(isControlled({ value: 0 }, 'value')).toBe(true);
});
it('returns true if value is arbitrary string', function () {
expect(isControlled({ value: 'hello' }, 'value')).toBe(true);
});
});
//# sourceMappingURL=controlled.test.js.map