Skip to content

Commit cf63b25

Browse files
committed
fix: aLIGNMENT type error
1 parent 4d2c7ab commit cf63b25

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/SizeAndPositionManager.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ describe('SizeAndPositionManager', () => {
171171

172172
describe('getUpdatedOffsetForIndex', () => {
173173
function getUpdatedOffsetForIndexHelper({
174-
align = ALIGNMENT.START,
174+
align = 'start',
175175
itemCount = 10,
176176
itemSize = ITEM_SIZE,
177177
containerSize = 50,
@@ -254,21 +254,21 @@ describe('SizeAndPositionManager', () => {
254254
it('should honor specified :align values', () => {
255255
expect(
256256
getUpdatedOffsetForIndexHelper({
257-
align: ALIGNMENT.START,
257+
align: 'start',
258258
currentOffset: 0,
259259
targetIndex: 5,
260260
}),
261261
).toEqual(50);
262262
expect(
263263
getUpdatedOffsetForIndexHelper({
264-
align: ALIGNMENT.END,
264+
align: 'end',
265265
currentOffset: 50,
266266
targetIndex: 5,
267267
}),
268268
).toEqual(10);
269269
expect(
270270
getUpdatedOffsetForIndexHelper({
271-
align: ALIGNMENT.CENTER,
271+
align: 'center',
272272
currentOffset: 50,
273273
targetIndex: 5,
274274
}),
@@ -278,21 +278,21 @@ describe('SizeAndPositionManager', () => {
278278
it('should not scroll past the safe bounds even if the specified :align requests it', () => {
279279
expect(
280280
getUpdatedOffsetForIndexHelper({
281-
align: ALIGNMENT.END,
281+
align: 'end',
282282
currentOffset: 50,
283283
targetIndex: 0,
284284
}),
285285
).toEqual(0);
286286
expect(
287287
getUpdatedOffsetForIndexHelper({
288-
align: ALIGNMENT.CENTER,
288+
align: 'center',
289289
currentOffset: 50,
290290
targetIndex: 1,
291291
}),
292292
).toEqual(0);
293293
expect(
294294
getUpdatedOffsetForIndexHelper({
295-
align: ALIGNMENT.START,
295+
align: 'start',
296296
currentOffset: 0,
297297
targetIndex: 9,
298298
}),
@@ -304,7 +304,7 @@ describe('SizeAndPositionManager', () => {
304304
// Not sure if this edge case is worth "fixing" or just acknowledging...
305305
expect(
306306
getUpdatedOffsetForIndexHelper({
307-
align: ALIGNMENT.CENTER,
307+
align: 'center',
308308
currentOffset: 0,
309309
targetIndex: 8,
310310
}),

0 commit comments

Comments
 (0)