Skip to content

test(sample/15): add e2e tests for mvc sample#16575

Closed
mahmoodhamdi wants to merge 1 commit intonestjs:masterfrom
mahmoodhamdi:test/sample-15-mvc-e2e
Closed

test(sample/15): add e2e tests for mvc sample#16575
mahmoodhamdi wants to merge 1 commit intonestjs:masterfrom
mahmoodhamdi:test/sample-15-mvc-e2e

Conversation

@mahmoodhamdi
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe: Adding missing e2e tests

What is the current behavior?

The sample/15-mvc application has no e2e tests. The test:e2e script in package.json outputs "No e2e tests implemented yet."

What is the new behavior?

Added an e2e test that verifies GET / renders the Handlebars index template with the expected "Hello world!" message. The test configures the NestExpressApplication with the hbs view engine and views directory, matching the setup in main.ts.

Also updated the test:e2e script to use the jest configuration.

Does this PR introduce a breaking change?

  • Yes
  • No

Add e2e tests to the MVC (Handlebars) sample application:

- Test that GET / renders the index template with the expected
  hello message using the hbs view engine
- Add jest-e2e.json configuration for the test runner
- Update test:e2e script in package.json to use jest config
@coveralls
Copy link

Pull Request Test Coverage Report for Build 84e73ef0-282b-43d8-8ef7-60205a3bf966

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.841%

Totals Coverage Status
Change from base Build d8b80ff4-1c32-4569-a75c-00480f0069ab: 0.0%
Covered Lines: 7473
Relevant Lines: 8318

💛 - Coveralls

@kamilmysliwiec
Copy link
Member

#16391

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.

3 participants