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

test(internal/cli): migrate internal cli tests to vitest and remove jest #7745

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

binoy14
Copy link
Contributor

@binoy14 binoy14 commented Nov 5, 2024

Description

Migrates the remaining cli tests in sanity package to vitest and removes jest from the monorepo

What to review

Changes makes sense

Testing

All tests should pass

Notes for release

N/A

Copy link

vercel bot commented Nov 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 4:29pm
performance-studio ✅ Ready (Inspect) Visit Preview Nov 5, 2024 4:29pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 4:29pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 4:29pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 4:29pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Nov 5, 2024 4:29pm

Copy link
Contributor Author

binoy14 commented Nov 5, 2024

Copy link
Contributor

github-actions bot commented Nov 5, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Component Testing Report Updated Nov 5, 2024 4:25 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 48s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 32s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 39s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 19s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 46s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 50s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 19s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 26s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 19s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 37s 12 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

Copy link
Contributor

github-actions bot commented Nov 5, 2024

⚡️ Editor Performance Report

Updated Tue, 05 Nov 2024 16:27:21 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 18.2 efps (55ms) 18.7 efps (54ms) -2ms (-2.7%)
article (body) 59.9 efps (17ms) 67.1 efps (15ms) -2ms (-10.8%)
article (string inside object) 19.6 efps (51ms) 20.0 efps (50ms) -1ms (-2.0%)
article (string inside array) 16.9 efps (59ms) 16.7 efps (60ms) +1ms (+1.7%)
recipe (name) 30.3 efps (33ms) 31.3 efps (32ms) -1ms (-3.0%)
recipe (description) 33.3 efps (30ms) 34.5 efps (29ms) -1ms (-3.3%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (6ms) +0ms (-/-%)
synthetic (title) 14.7 efps (68ms) 14.5 efps (69ms) +1ms (+1.5%)
synthetic (string inside object) 14.5 efps (69ms) 14.3 efps (70ms) +1ms (+1.4%)

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 55ms 58ms 64ms 221ms 425ms 13.8s
article (body) 17ms 19ms 23ms 96ms 117ms 5.4s
article (string inside object) 51ms 55ms 58ms 170ms 246ms 8.1s
article (string inside array) 59ms 64ms 71ms 353ms 690ms 9.3s
recipe (name) 33ms 34ms 57ms 88ms 8ms 8.8s
recipe (description) 30ms 31ms 32ms 55ms 0ms 5.9s
recipe (instructions) 6ms 8ms 9ms 32ms 0ms 3.4s
synthetic (title) 68ms 72ms 84ms 299ms 1381ms 15.5s
synthetic (string inside object) 69ms 78ms 91ms 343ms 1629ms 10.6s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 54ms 56ms 63ms 165ms 378ms 12.8s
article (body) 15ms 18ms 21ms 120ms 290ms 5.5s
article (string inside object) 50ms 53ms 62ms 199ms 210ms 8.0s
article (string inside array) 60ms 64ms 75ms 314ms 629ms 9.0s
recipe (name) 32ms 35ms 39ms 71ms 0ms 8.5s
recipe (description) 29ms 31ms 34ms 64ms 7ms 5.9s
recipe (instructions) 6ms 8ms 9ms 10ms 0ms 3.3s
synthetic (title) 69ms 73ms 83ms 175ms 1421ms 14.6s
synthetic (string inside object) 70ms 75ms 102ms 398ms 1746ms 10.4s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

@binoy14 binoy14 changed the title test(internal/cli): migrate internal cli tests to vitest test(internal/cli): migrate internal cli tests to vitest and remove jest Nov 5, 2024
Copy link

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: npm/@jest/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link
Member

@bjoerge bjoerge left a comment

Choose a reason for hiding this comment

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

This is huge, thank you so much for tackling this @binoy14! 🙇🏼 💖

@binoy14 binoy14 added this pull request to the merge queue Nov 6, 2024
Merged via the queue into next with commit e5ec632 Nov 6, 2024
62 checks passed
@binoy14 binoy14 deleted the sdk-29 branch November 6, 2024 17:33
bjoerge added a commit that referenced this pull request Nov 6, 2024
* next:
  feat(codegen): fix literal function arguments and add default values
  feat(codegen): add support for export all
  test(internal/cli): migrate internal cli tests to vitest and remove jest (#7745)
  fix(core): explicitly pass `randomKey(12)` as the PTE `keyGenerator` (#7759)
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.

2 participants