-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
apiAnything to do with the APIAnything to do with the APIapi clientAny thing to do with the API ClientAny thing to do with the API ClientbugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
API-Client pipeline is not failing correctly when generated openapi spec doesn't exist
This pipeline passed when it failed
yarn run v1.22.19
$ jest
FAIL tests/unit/MockData/htmlAnswers.test.ts
● Test suite failed to run
src/mockData/htmlQuiz/htmlAnswers.ts:1:22 - error TS230[7](https://github.com/howToCodeWell/code-quiz/actions/runs/3211121002/jobs/5249066403#step:6:8): Cannot find module '../../generated/openapi/src' or its corresponding type declarations.
1 import {Answer} from "../../generated/openapi/src"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PASS tests/unit/api/apiClient.test.ts
API Client headers
✓ Should have a content type of application/json (2 ms)
✓ Should have a accept header with the value application/json
API Client options
✓ Should have the base url of http://localhost:3000
FAIL tests/integration/api/requestHandlers/quizRequest.test.ts
● Test suite failed to run
src/mockData/quiz.ts:1:20 - error TS2307: Cannot find module '../generated/openapi/src' or its corresponding type declarations.
1 import {Quiz} from "../generated/openapi/src"
~~~~~~~~~~~~~~~~~~~~~~~~~~
FAIL tests/integration/server.test.ts
● Test suite failed to run
src/mockData/quiz.ts:1:[20](https://github.com/howToCodeWell/code-quiz/actions/runs/3211121002/jobs/5249066403#step:6:21) - error TS[23](https://github.com/howToCodeWell/code-quiz/actions/runs/3211121002/jobs/5249066403#step:6:24)07: Cannot find module '../generated/openapi/src' or its corresponding type declarations.
1 import {Quiz} from "../generated/openapi/src"
Steps to reproduce
- Don't generate OpenAPI spec file
- Run the unit tests
Expected behavior
Pipeline should of failed
Screenshots and recordings
See https://github.com/howToCodeWell/code-quiz/actions/runs/3211121002/jobs/5249066403
OS / Linux distribution
MacOS
Additional context
No response
Metadata
Metadata
Assignees
Labels
apiAnything to do with the APIAnything to do with the APIapi clientAny thing to do with the API ClientAny thing to do with the API ClientbugSomething isn't workingSomething isn't working