node icon indicating copy to clipboard operation
node copied to clipboard

test: refactor repl save-load tests

Open dario-piotrowicz opened this issue 6 months ago • 4 comments

refactor the test/parallel/test-repl-save-load.js file by:

  • making the tests in the file self-contained (instead of all of them sharing the same REPL instance and constantly calling .clear on it)
  • clearly separating and commenting the various tests to make clearer what is being tested

Pretty much the same as https://github.com/nodejs/node/pull/58636 :slightly_smiling_face:

dario-piotrowicz avatar Jun 15 '25 12:06 dario-piotrowicz

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.11%. Comparing base (5584cc5) to head (e5fcd0f). Report is 180 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58715      +/-   ##
==========================================
- Coverage   90.13%   90.11%   -0.02%     
==========================================
  Files         639      639              
  Lines      188192   188192              
  Branches    36916    36905      -11     
==========================================
- Hits       169633   169598      -35     
- Misses      11324    11339      +15     
- Partials     7235     7255      +20     

see 42 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jun 15 '25 13:06 codecov[bot]

using the test runner with appropriate descriptions to make clearer what is being tested

It was discussed ad ad nauseam and there is no real benefit to these refactorings. Can you please add comments instead or split the tests into multiple files?

lpinca avatar Jun 15 '25 18:06 lpinca

using the test runner with appropriate descriptions to make clearer what is being tested

It was discussed ad ad nauseam and there is no real benefit to these refactorings. Can you please add comments instead or split the tests into multiple files?

The tests needed refactoring and since I was already at it I didn't see much harm in going with the test runner (which is my personal preference).

That is not the focal point of this refactoring so I will refactor this not to use the test runner not to get into already overly discussed arguments.

dario-piotrowicz avatar Jun 15 '25 20:06 dario-piotrowicz

test runner usage removed

dario-piotrowicz avatar Jun 15 '25 20:06 dario-piotrowicz

CI: https://ci.nodejs.org/job/node-test-pull-request/67544/

nodejs-github-bot avatar Jun 19 '25 20:06 nodejs-github-bot

thanks @lpinca 🫶

dario-piotrowicz avatar Jun 19 '25 21:06 dario-piotrowicz

CI: https://ci.nodejs.org/job/node-test-pull-request/67547/

nodejs-github-bot avatar Jun 19 '25 23:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67551/

nodejs-github-bot avatar Jun 20 '25 01:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67568/

nodejs-github-bot avatar Jun 20 '25 13:06 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/67573/

nodejs-github-bot avatar Jun 20 '25 17:06 nodejs-github-bot

Commit Queue failed
- Loading data for nodejs/node/pull/58715
✔  Done loading data for nodejs/node/pull/58715
----------------------------------- PR info ------------------------------------
Title      test: refactor repl save-load tests (#58715)
Author     Dario Piotrowicz <[email protected]> (@dario-piotrowicz)
Branch     dario-piotrowicz:dario/refactor-test-repl-save-load -> nodejs:main
Labels     test, author ready, needs-ci, commit-queue-squash
Commits    2
 - test: refactor repl save-load tests
 - fixup! test: refactor repl save-load tests
Committers 1
 - Dario Piotrowicz <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/58715
Reviewed-By: Luigi Pinca <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/58715
Reviewed-By: Luigi Pinca <[email protected]>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sun, 15 Jun 2025 12:55:54 GMT
   ✔  Approvals: 1
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/58715#pullrequestreview-2943994619
   ✘  This PR needs to wait 24 more hours to land (or 0 hours if there is one more approval)
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2025-06-20T17:08:02Z: https://ci.nodejs.org/job/node-test-pull-request/67573/
- Querying data for job/node-test-pull-request/67573/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/15795695104

nodejs-github-bot avatar Jun 21 '25 12:06 nodejs-github-bot

Landed in 910a8af2d2bc028976f997baf7f7910b9eef30f2

nodejs-github-bot avatar Jun 22 '25 18:06 nodejs-github-bot

Backport is blocked on the backport of https://github.com/nodejs/node/pull/57909

aduh95 avatar Jul 21 '25 17:07 aduh95