fix: add repl instrumentation for context sharing#1254
Conversation
| throw new Error("Unable to enter REPL before test: browser is not available in the test scope"); | ||
| } | ||
|
|
||
| await __testplaneReplBrowser.switchToRepl({ |
There was a problem hiding this comment.
This is the core idea, what's added to test body. We use this in switchToRepl command implementation.
| assert.match(result, /await browser\.url\("about:blank"\)/); | ||
| }); | ||
|
|
||
| it("should not read browser from TDZ if test callback declares local browser", () => { |
There was a problem hiding this comment.
temporal dead zone in js
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8499c7fa32
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8499c7f to
804688a
Compare
804688a to
71d15d4
Compare
|
@codex review |
71d15d4 to
211b395
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71d15d4204
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
What's done?
Implemented a way to "see" the file context when in REPL mode. Before, REPL console didn't have access to anything that surrounds the test. Now, running commands in REPL is very close to literally running them inside the test.
This works through code instrumentation at test reading time and only when repl is enabled. The idea is this: