Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Migrate tests from Jest to Bun #411

Merged
merged 38 commits into from
Feb 19, 2024
Merged

Conversation

titouanmathis
Copy link
Contributor

@titouanmathis titouanmathis commented Feb 16, 2024

For speed ⚡

To-do

  • Mock scrollHeight and scrollWidth
  • Mock history API
  • Reset DOM state after tests (tests run together fail, but they pass when run individually)

Copy link

github-actions bot commented Feb 16, 2024

Export Size

@studiometa/js-toolkit

Name Size Diff
isEmptyString 103 B +103 B (+100.00%) 🔺
withRelativePointer 997 B +10 B (+1.01%) 🔺
usePointer 841 B +4 B (+0.48%) 🔺
UTILS 5.92 kB +16 B (+0.27%) 🔺
ALL 15.64 kB -1 B (-0.01%) 🔽
withScrolledInView 1.96 kB -4 B (-0.20%) 🔽
FRAMEWORK 11.53 kB -24 B (-0.21%) 🔽
Base 7.21 kB -28 B (-0.39%) 🔽
SERVICES 3.12 kB -14 B (-0.45%) 🔽
DECORATORS 6.34 kB -31 B (-0.49%) 🔽
transition 908 B -16 B (-1.73%) 🔽
withDrag 1.76 kB -36 B (-2.01%) 🔽
animate 2.32 kB -49 B (-2.07%) 🔽
tween 1.19 kB -32 B (-2.62%) 🔽
useDrag 1.61 kB -45 B (-2.72%) 🔽
useRaf 682 B -44 B (-6.06%) 🔽
nextFrame 162 B -13 B (-7.43%) 🔽
Unchanged

@studiometa/js-toolkit

Name Size Diff
addClass 219 B -
addStyle 232 B -
boundingRectToCircle 154 B -
clamp 67 B -
clamp01 87 B -
collideCircleCircle 99 B -
collideCircleRect 159 B -
collidePointCircle 112 B -
collidePointRect 103 B -
collideRectRect 99 B -
createApp 347 B -
createEaseInOut 116 B -
createEaseOut 71 B -
damp 78 B -
debounce 92 B -
domScheduler 296 B -
ease 410 B -
easeInCirc 68 B -
easeInCubic 59 B -
easeInExpo 80 B -
easeInOutCirc 141 B -
easeInOutCubic 130 B -
easeInOutExpo 134 B -
easeInOutQuad 128 B -
easeInOutQuart 133 B -
easeInOutQuint 152 B -
easeInOutSine 151 B -
easeInQuad 63 B -
easeInQuart 61 B -
easeInQuint 62 B -
easeInSine 77 B -
easeOutCirc 115 B -
easeOutCubic 103 B -
easeOutExpo 112 B -
easeOutQuad 103 B -
easeOutQuart 100 B -
easeOutQuint 103 B -
easeOutSine 121 B -
endsWith 88 B -
getAncestorWhere 91 B -
getAncestorWhereUntil 119 B -
getClosestParent 178 B -
getComponentResolver 138 B -
getDirectChildren 183 B -
getInstanceFromElement 90 B -
getOffsetSizes 160 B -
hasWindow 62 B -
HELPERS 1.23 kB -
historyPush 499 B -
historyReplace 503 B -
importOnInteraction 440 B -
importOnMediaQuery 236 B -
importWhenIdle 223 B -
importWhenPrefersMotion 275 B -
importWhenVisible 465 B -
inertiaFinalValue 142 B -
isArray 70 B -
isBoolean 78 B -
isDefined 86 B -
isDev 72 B -
isDirectChild 212 B -
isFunction 72 B -
isNumber 84 B -
isObject 105 B -
isString 86 B -
keyCodes 100 B -
lerp 57 B -
map 71 B -
matrix 106 B -
memoize 189 B -
nextMicrotask 111 B -
nextTick 134 B -
noop 39 B -
noopValue 49 B -
objectToURLSearchParams 302 B -
Queue 226 B -
removeClass 217 B -
removeStyle 233 B -
round 56 B -
saveActiveElement 56 B -
scrollTo 417 B -
SmartQueue 411 B -
startsWith 87 B -
throttle 101 B -
toggleClass 220 B -
transform 317 B -
trapFocus 366 B -
untrapFocus 45 B -
useKey 630 B -
useLoad 373 B -
useResize 694 B -
useScheduler 290 B -
useScroll 697 B -
useService 254 B -
wait 79 B -
withBreakpointManager 1.09 kB -
withBreakpointObserver 1.29 kB -
withExtraConfig 135 B -
withFreezedOptions 140 B -
withIntersectionObserver 276 B -
withLeadingCharacters 88 B -
withLeadingSlash 107 B -
withMountOnMediaQuery 338 B -
withMountWhenInView 331 B -
withMountWhenPrefersMotion 370 B -
withoutLeadingCharacters 86 B -
withoutLeadingCharactersRecursive 124 B -
withoutLeadingSlash 93 B -
withoutTrailingCharacters 98 B -
withoutTrailingCharactersRecursive 129 B -
withoutTrailingSlash 103 B -
withResponsiveOptions 1.89 kB -
withTrailingCharacters 96 B -
withTrailingSlash 120 B -

@titouanmathis
Copy link
Contributor Author

Need to wait for oven-sh/bun#4015 to re-enable Codecov coverage upload.

@titouanmathis titouanmathis merged commit 8dc6465 into develop Feb 19, 2024
12 checks passed
@titouanmathis titouanmathis deleted the feature/test-bun branch February 19, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant