diff --git a/packages/query-devtools/src/__tests__/utils.test.ts b/packages/query-devtools/src/__tests__/utils.test.ts index 019063e698..1c30c5e918 100644 --- a/packages/query-devtools/src/__tests__/utils.test.ts +++ b/packages/query-devtools/src/__tests__/utils.test.ts @@ -4,6 +4,7 @@ import { displayValue, getMutationStatusColor, getQueryStatusColorByLabel, + getSidedProp, updateNestedDataByPath, } from '../utils' import type { MutationStatus } from '@tanstack/query-core' @@ -827,4 +828,22 @@ describe('Utils tests', () => { expect(displayValue({ a: 1 }, true)).toBe('{\n "a": 1\n}') }) }) + + describe('getSidedProp', () => { + it('should append capitalized "top" to the prop', () => { + expect(getSidedProp('margin', 'top')).toBe('marginTop') + }) + + it('should append capitalized "bottom" to the prop', () => { + expect(getSidedProp('margin', 'bottom')).toBe('marginBottom') + }) + + it('should append capitalized "left" to the prop', () => { + expect(getSidedProp('padding', 'left')).toBe('paddingLeft') + }) + + it('should append capitalized "right" to the prop', () => { + expect(getSidedProp('padding', 'right')).toBe('paddingRight') + }) + }) })