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

[dove/cli] Address strictNullCheck error on app.test.ts #2466

Merged
merged 1 commit into from
Oct 12, 2021
Merged

[dove/cli] Address strictNullCheck error on app.test.ts #2466

merged 1 commit into from
Oct 12, 2021

Conversation

FossPrime
Copy link
Member

Strict null checks are on in our tsconfig.json... so we run into the following error without this PR.
https://stackoverflow.com/a/58401023/370238

https://codesandbox.io/s/feathers-dove-cs7qc?file=/test/app.test.ts

Before PR:

test/app.test.ts:36:28 - error TS2532: Object is possibly 'undefined'.

36         assert.strictEqual(response.data.name, 'NotFound')
                              ~~~~~~~~

After PR:


  Feathers application tests
    ✔ starts and shows the index page (44ms)
    ✔ shows a 404 JSON error

  'messages' service
    ✔ registered the service


  3 passing (54ms)

Summary

(If you have not already please refer to the contributing guideline as described
here
)

  • Tell us about the problem your pull request is solving.
  • Are there any open issues that are related to this?
  • Is this PR dependent on PRs in other repos?

Strict null checks are on in our tsconfig.json... so we run into the following error without this PR.
https://stackoverflow.com/a/58401023/370238

```
test/app.test.ts:36:28 - error TS2532: Object is possibly 'undefined'.

36         assert.strictEqual(response.data.name, 'NotFound')
                              ~~~~~~~~
```
@daffl daffl merged commit b214d34 into feathersjs:hygen-cli Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants