-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat: resolve server URLs before calling other listeners #19981
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
base: main
Are you sure you want to change the base?
Conversation
0ad0e5f
to
4be204e
Compare
I think you can put it in test('check', () => {
expect.assertions(1)
const { promise, resolve } = promiseWithResolvers<void>()
const server = await createServer({
root: __dirname,
logLevel: 'error',
server: {
port: 9400, // make sure the port is unique
ws: false,
},
plugins: [/* add plugin that checks server.resolvedUrls here */]
})
await server.listen()
await promise
}) It needs to wait for the |
4be204e
to
a8ec11c
Compare
Thanks for the suggestion. That worked out very good. I added a new suite to the dev.spec.ts that fails without this patch and is green with this patch. |
a8ec11c
to
79dd10b
Compare
79dd10b
to
20c8349
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Has the Windows test fail anything to do with these changes? Is there something I can do here? |
It's probably a flaky fail. I've retriggered the CI 👍 |
Description
This PR moves the resolving of the URLs to before the server is started. This way one can use
configureServer
to get those information from the server.I added a first test but am a little lost in how and where I could test the integrated functions. I'd love for this to get merged but would also appreciate help on how to write more tests here.
Thank you folks so much!