[core] Replace Jasmine v1 Test Runner with new repo - #1525
Open
confused-Techie wants to merge 1 commit into
Open
[core] Replace Jasmine v1 Test Runner with new repo#1525confused-Techie wants to merge 1 commit into
confused-Techie wants to merge 1 commit into
Conversation
savetheclocktower
self-requested a review
June 11, 2026 04:29
Contributor
|
Adding myself as a reviewer so that I don't forget about this. Also gave it a 1.134.0 milestone so that it gets reviewed eventually (we've already got a lot of stuff in the hopper for 1.133.0!). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed on Discord, this PR replaces all of our existing
jasmine1-test-runnerlogic with my working repositorypulsar-jasmine1-test-runner.Doing this brings quite a bit of code (that we likely will never touch due to compatibility) out of core and siloed into it's own repo.
Why do this?
Currently, our Jasmine 1 test runner, is honestly wildly complex. And if you wanted to track down how it all worked, boy were you in for a bad time.
Without getting too into the weeds of it, but to truly understand how we defined Jasmine, you'd have to:
./spec/helpers: Has several different modules that add new stuff or change stuff of Jasmine./vendor/jasmine.js: Seems like it'd be our main jasmine definition, but it's actually mostly redefined later../vendor/jquery-jasmine.js: More special stuff on top of Jasminejasmine-focused: Another repository that does more special stuffjasmine-json: Another repository that does more special stuffjasmine-reporters: Another repository that does more special stuffjasmine-tagged: Another repository that does more special stuffjasmine-node: Now it gets tricky, this isn'tmheverys repository like you might think, it's a branched version made bykevinsawickithat we technically import fromjasmine-focusedthat we define over itself a couple of times. Even more complicated we technically define it over top of our own vendored Jasmine, but the two copies are nearly identical, except about 18 additions bykevinsawickiand about 276 additions on our vendored copy.And keep in mind with how much redefining we do over top of things already defined in the global namespace the order of these changes/redefinitions matters a great deal.
Plus each new repository has many of the same modules of varying versions that are all out of sync with each other.
So to finally answer the why, bringing in a single module of
pulsar-jasmine1-test-runnermeans we can archive all of these separate repos, and have one set of modules to keep updated within this other repository, and means we can put all of the code that defines ourjasmine1runner in one place.Even though in that repo I kept the structure the same, meaning there's still a lot of bouncing back and forth, and redefinitions, I still feel the advantages outweigh the disadvantages. Especially when we consider that we will likely never change how this test runner functions, we would only move to update the test runner like we already have with our
jasmine2-test-runnerbeing what's used in the main Pulsar repository.Now I will specify, if we like what this PR does and the general shape of my working example of the
pulsar-jasmine1-test-runnerrepository, I'd recommend that prior to any kind of merge we fork my repo to Pulsar, and publish to NPM as@pulsar-edit/jasmine1-test-runnerthen make sure we use that version here. Just getting this up as a way to get this idea reviewed in some detail.And if we don't like the shape of my repository I'm already having to stop myself from trying to clean it up too much, since while I'd want to, I would be pretty nervous about breaking something in a subtle hard to catch way, but I'd still be up for cleaning it up if we really wanted too