You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when it gets to the second test ("Route / exists and renders HTML with CSS applied") it throws this Error:
test("Route / exists and renders HTML with CSS applied",asynct=>{console.log("Rendering window");// console.log("nuxt.server: ", nuxt.server);constwindow: Window=awaitnuxt.server.renderAndGetWindow(url("/"));//(...)});
What is expected ?
Maybe allow the user to change the timeout, since it is hardcoded as a default parameter even though it is not used anywhere.
Plus I'd like to actually be able to do some tests.
What is actually happening?
× test » index.ts » Route / exists and renders HTML with CSS applied Rejected promise returned by test
1 test failed
test » index.ts » Route / exists and renders HTML with CSS applied
F:\projects\web\mireks\mireks_next\src\node_modules\@nuxt\utils\dist\utils.js:1849
Rejected promise returned by test. Reason:
Error {
message: 'Components loading in renderAndGetWindow was not completed in 2s',
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
Additional comments?
Here's the before test part:
test.before("Init Nuxt.js",asynct=>{constrootDir=resolve(__dirname,"..");letconfig: NuxtConfiguration={};config=require(resolve(rootDir,"nuxt.config.ts")).default;config.rootDir=rootDir;// project folderconfig.dev=true;// production buildconfig._typescript={build: true};nuxt=newNuxt(config);awaitnewBuilder(nuxt).build();awaitnuxt.server.listen(4000,"localhost");});
This bug report is available on Nuxt community (#c9435)
The text was updated successfully, but these errors were encountered:
I tried setting the third argument anyway like this: await nuxt.server.renderAndGetWindow(url("/"), undefined, {loadingTimeout: 10000});, but I got this:
Error {
message: 'Components loading in renderAndGetWindow was not completed in 2s',
}
Version
v2.8.1
Reproduction link
https://github.com/JakubKoralewski/mireks/tree/5f609e843a21b1130ef8e8e9770015c8538d4c65
Steps to reproduce
npm run test
.What is expected ?
Maybe allow the user to change the timeout, since it is hardcoded as a default parameter even though it is not used anywhere.
Plus I'd like to actually be able to do some tests.
What is actually happening?
Additional comments?
Here's the
before test
part:The text was updated successfully, but these errors were encountered: