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

Fix issue in testing libraries where there might not be a DOM node #4454

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

JoviDeCroock
Copy link
Member

Some hooks based testing libraries work without a DOM node so it will be undefined all the time, this loosens the check

Copy link

github-actions bot commented Jul 24, 2024

📊 Tachometer Benchmark Results

Summary

⏳ Benchmarks are currently running. Results below are out of date.

duration

  • create10k: unsure 🔍 -1% - +1% (-9.90ms - +6.93ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +0% (-0.09ms - +0.06ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +4% (-1.90ms - +3.07ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -2% - +4% (-0.40ms - +0.61ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +3% (-0.73ms - +2.33ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +4% (-0.10ms - +0.09ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -3% - +1% (-0.77ms - +0.20ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -2% - +4% (-0.54ms - +1.47ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +0% (-0.30ms - +0.02ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +1% (-0.01ms - +0.03ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main

Results

⏳ Benchmarks are currently running. Results below are out of date.
create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local871.47ms - 880.07ms-unsure 🔍
-1% - +1%
-9.90ms - +6.93ms
preact-main870.02ms - 884.49msunsure 🔍
-1% - +1%
-6.93ms - +9.90ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local25.15ms - 25.15ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main25.15ms - 25.15msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.64ms - 16.74ms-unsure 🔍
-1% - +0%
-0.09ms - +0.06ms
preact-main16.66ms - 16.77msunsure 🔍
-0% - +1%
-0.06ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.69ms - 1.70ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main1.69ms - 1.69msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local76.75ms - 80.27ms-unsure 🔍
-2% - +4%
-1.90ms - +3.07ms
preact-main76.17ms - 79.67msunsure 🔍
-4% - +2%
-3.07ms - +1.90ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local13.16ms - 13.17ms-unsure 🔍
-2% - +0%
-0.30ms - +0.02ms
preact-main13.14ms - 13.47msunsure 🔍
-0% - +2%
-0.02ms - +0.30ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.67ms - 17.65ms-unsure 🔍
-2% - +4%
-0.40ms - +0.61ms
preact-main16.92ms - 17.18msunsure 🔍
-4% - +2%
-0.61ms - +0.40ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.62ms - 4.62ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-main4.62ms - 4.62msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local78.26ms - 80.54ms-unsure 🔍
-1% - +3%
-0.73ms - +2.33ms
preact-main77.58ms - 79.62msunsure 🔍
-3% - +1%
-2.33ms - +0.73ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.56ms - 3.59ms-unsure 🔍
-0% - +1%
-0.01ms - +0.03ms
preact-main3.55ms - 3.58msunsure 🔍
-1% - +0%
-0.03ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local29.33ms - 29.99ms-unsure 🔍
-2% - +1%
-0.57ms - +0.39ms
preact-main29.40ms - 30.10msunsure 🔍
-1% - +2%
-0.39ms - +0.57ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local35.79ms - 37.64ms-unsure 🔍
-1% - +7%
-0.27ms - +2.35ms
preact-main34.75ms - 36.59msunsure 🔍
-6% - +1%
-2.35ms - +0.27ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local25.92ms - 26.64ms-unsure 🔍
-2% - +3%
-0.43ms - +0.69ms
preact-main25.72ms - 26.58msunsure 🔍
-3% - +2%
-0.69ms - +0.43ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local31.60ms - 33.22ms-unsure 🔍
-1% - +5%
-0.46ms - +1.68ms
preact-main31.10ms - 32.50msunsure 🔍
-5% - +1%
-1.68ms - +0.46ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local21.52ms - 22.71ms-unsure 🔍
-6% - +2%
-1.29ms - +0.45ms
preact-main21.90ms - 23.17msunsure 🔍
-2% - +6%
-0.45ms - +1.29ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local23.58ms - 24.73ms-unsure 🔍
-1% - +5%
-0.30ms - +1.21ms
preact-main23.21ms - 24.18msunsure 🔍
-5% - +1%
-1.21ms - +0.30ms
-
text-update

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.91ms - 2.02ms-unsure 🔍
-5% - +4%
-0.10ms - +0.09ms
preact-main1.90ms - 2.04msunsure 🔍
-4% - +5%
-0.09ms - +0.10ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.98ms - 0.98ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main0.98ms - 0.98msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local25.52ms - 25.74ms-unsure 🔍
-3% - +1%
-0.77ms - +0.20ms
preact-main25.44ms - 26.39msunsure 🔍
-1% - +3%
-0.20ms - +0.77ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.25ms - 1.25ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.25ms - 1.25msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.48ms - 35.26ms-unsure 🔍
-2% - +4%
-0.54ms - +1.47ms
preact-main33.45ms - 34.36msunsure 🔍
-4% - +2%
-1.47ms - +0.54ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.55ms - 3.55ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main3.55ms - 3.55msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link

github-actions bot commented Jul 24, 2024

Size Change: -4 B (-0.01%)

Total Size: 62 kB

Filename Size Change
debug/dist/debug.js 3.7 kB -2 B (-0.05%)
debug/dist/debug.module.js 3.71 kB -1 B (-0.03%)
debug/dist/debug.umd.js 3.78 kB -1 B (-0.03%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.1 kB
compat/dist/compat.module.js 4.03 kB
compat/dist/compat.umd.js 4.17 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.module.js 273 B
devtools/dist/devtools.umd.js 345 B
dist/preact.js 4.72 kB
dist/preact.min.js 4.75 kB
dist/preact.min.module.js 4.75 kB
dist/preact.min.umd.js 4.77 kB
dist/preact.module.js 4.74 kB
dist/preact.umd.js 4.79 kB
hooks/dist/hooks.js 1.53 kB
hooks/dist/hooks.module.js 1.56 kB
hooks/dist/hooks.umd.js 1.6 kB
jsx-runtime/dist/jsxRuntime.js 981 B
jsx-runtime/dist/jsxRuntime.module.js 956 B
jsx-runtime/dist/jsxRuntime.umd.js 1.06 kB
test-utils/dist/testUtils.js 451 B
test-utils/dist/testUtils.module.js 456 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

@coveralls
Copy link

coveralls commented Jul 24, 2024

Coverage Status

coverage: 99.486%. remained the same
when pulling 5ea0e21 on JoviDeCroock-patch-1
into 2f1712a on main.

@coveralls
Copy link

Coverage Status

coverage: 99.486%. remained the same
when pulling 2b39ea8 on JoviDeCroock-patch-1
into 2f1712a on main.

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit worried that we'll have to widen our types to include undefined in other places in the future as well, but for now this seems fine.

Co-authored-by: Marvin Hagemeister <hello@marvinh.dev>
@JoviDeCroock JoviDeCroock merged commit f0e4917 into main Jul 24, 2024
13 checks passed
@JoviDeCroock JoviDeCroock deleted the JoviDeCroock-patch-1 branch July 24, 2024 19:15
@JoviDeCroock JoviDeCroock mentioned this pull request Jul 24, 2024
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.

3 participants