Giter Club home page Giter Club logo

Comments (5)

dthyresson avatar dthyresson commented on May 29, 2024 2

@ThomasGHenry Did you try

yarn rw test --testTimeout=10000

Not that your issue said you tried yarn rw test -- --testTimeout=10000

From what I see in

// and forward on the other flags
all other flags are forwarded,

If I do

`yarn rw test --timoutt=10000`

A non-recognized flag, then it errors:

● Unrecognized CLI Parameter:

  Unrecognized option "timoutt".

  CLI Options Documentation:
  https://jestjs.io/docs/cli

It might that that extra -- that prevent the string to be forwarded.

from redwood.

dthyresson avatar dthyresson commented on May 29, 2024

@ThomasGHenry Hi again, I did reply in the community thread here https://community.redwoodjs.com/t/set-jest-testtimeout/5618 but will keep this issue up-to-date with any findings to help customize and set the test timeout on the api side tests.

from redwood.

dthyresson avatar dthyresson commented on May 29, 2024

Also, @ThomasGHenry could you try running yarn rw test --debug, the warning might be just that, an odd warning, but the actual setting testTimeout seems to be there in the config:

    "testFailureExitCode": 1,
    "testPathPattern": "",
    "testSequencer": ".....demos/node_modules/@jest/test-sequencer/build/index.js",
    "testTimeout": 30000, <---------------------------
    "updateSnapshot": "new",
    "useStderr": false,
    "verbose": true,
    "watch": true,
    "watchAll": false,
    "watchPlugins": [

when I set

// More info at https://redwoodjs.com/docs/project-configuration-dev-test-build

const config = {
  rootDir: '../',
  preset: '@redwoodjs/testing/config/jest/web',
  verbose: true,
  testTimeout: 30000,
}

module.exports = config

for my web side config

from redwood.

dthyresson avatar dthyresson commented on May 29, 2024

Actually, @ThomasGHenry I was about to set a custom test timeout for the api side api/jest.config.js:

// api/jest.config.js
// More info at https://redwoodjs.com/docs/project-configuration-dev-test-build

const config = {
  rootDir: '../',
  preset: '@redwoodjs/testing/config/jest/api',
  testTimeout: 80000,
}

module.exports = config

and yarn rw test api --debug shows:

    "testFailureExitCode": 1,
    "testPathPattern": "",
    "testSequencer": "..../node_modules/@jest/test-sequencer/build/index.js",
    "testTimeout": 80000, <--------------------------
    "updateSnapshot": "new",
    "useStderr": false,
    "watch": true,
    "watchAll": false,
    "watchPlugins": [

Does that work for you?

Note: I did not set that for the web side test in the config.

Also, I did not get any validation warnings the just setting the api side.

from redwood.

ThomasGHenry avatar ThomasGHenry commented on May 29, 2024

It might that that extra -- that prevent the string to be forwarded.

That did it on the CLI!

I'll circle back for the other suggestions another time, but nothing I've tried json-wise worked as expected so far.

Thanks!

from redwood.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.