Skip to content
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

Modified type for describeScenario #10468

Merged
merged 3 commits into from
Apr 21, 2024
Merged

Conversation

cjreimer
Copy link
Contributor

@cjreimer cjreimer commented Apr 16, 2024

I'm really enjoying the performance improvements that describeScenario brings to testing!

When in typestrict strict mode, I've noted that the getScenario() function returned can be undefined (per current types), but it doesn't look like the function will ever be undefined.

interface DescribeBlockWithGetScenario<TData> {
  (getScenario?: () => TData): void
}

I'm proposing the ? is not needed.

@dac09 are you able to confirm the change is correct?

Note: Prettier got rid of some commas as well.... or is this a new style the team is using?

@ahaywood
Copy link
Contributor

@cjreimer Thanks for submitting! I'll make sure the team gets eyes on this.

Copy link
Collaborator

@dac09 dac09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cjreimer

@dac09 dac09 added this to the next-release-patch milestone Apr 21, 2024
@dac09 dac09 enabled auto-merge (squash) April 21, 2024 09:24
@dac09 dac09 merged commit 9e4475a into redwoodjs:main Apr 21, 2024
49 of 57 checks passed
dac09 added a commit that referenced this pull request Apr 22, 2024
…g-gen-mw-p2

* 'main' of github.com:redwoodjs/redwood:
  fix(deps): update React to latest canary 19.x (#10496)
  fix(upgrade): Download yarn patches (#10497)
  Revert React 19 upgrade (#10482 and #10491) (#10495)
  Modified type for describeScenario (#10468)
  fix(upgrade): Download yarn patches (#10491)
  fix(deps): update React to latest canary 19.x (#10482)
  chore(dataMigrate): Fix package.json directory value (#10490)
  RSC: css preinit: Add required option precedence (#10481)
  chore(renovate): Remove config for unused package (#10489)
  RSC: Update test projects to use new @apollo/client-react-streaming (#10488)
  RSC: Remove unused vite patch from test-project-rsa (#10487)
  chore(ssr): Switch to use `@apollo/client-react-streaming` package (#10484)
  chore(docs): Move .mdx import into separate file (#10486)
  fix(cli): avoid `npx` during upgrade command (#10479)
  fix: Fixes Unknown Fragment issues due to GraphQL Tag type mismatch in web (#10357)
  RSC: Clean up some comments and logs (#10480)
  feat: redwoodjs/auth-dbauth-middleware - Part 2/3 - Auth Middleware for dbAuth to authenticate users via cookie (#10447)
Josh-Walker-GM pushed a commit that referenced this pull request Apr 23, 2024
Co-authored-by: Daniel Choudhury <dannychoudhury@gmail.com>
Josh-Walker-GM pushed a commit that referenced this pull request Apr 23, 2024
Co-authored-by: Daniel Choudhury <dannychoudhury@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants