Skip to content

Conversation

@rubennorte
Copy link
Contributor

Summary:
Changelog: [internal]

I realized that the Fantom module was being initialized before the execution of the test module itself (as part of the code generated by the runner), which could have problems if the test sets up the global environment that Fantom consumes. For example, if Fantom needs to use the EventTarget type from the global scope, it needs to wait until the initialization of the runtime so it can use it safely.

This refactors all the code calling into Fantom as part of our infra to always initialize it lazily, so the first thing that runs as part of the test execution is the test itself (apart from our test setup, which is supposed to be side-effect free).

Differential Revision: D75681181

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 30, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75681181

…ody of the test (facebook#51696)

Summary:

Changelog: [internal]

I realized that the Fantom module was being initialized before the execution of the test module itself (as part of the code generated by the runner), which could have problems if the test sets up the global environment that Fantom consumes. For example, if Fantom needs to use the `EventTarget` type from the global scope, it needs to wait until the initialization of the runtime so it can use it safely.

This refactors all the code calling into Fantom as part of our infra to always initialize it lazily, so the first thing that runs as part of the test execution is the test itself (apart from our test setup, which is supposed to be side-effect free).

Reviewed By: sammy-SC

Differential Revision: D75681181
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75681181

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a218b63.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants