Skip to content

Commit

Permalink
[integration] chore: Rename integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
helloitsdave committed May 28, 2024
1 parent 1baaf36 commit 19c365d
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Backend Unit Tests
name: Backend Integration Tests

on:
push:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
npm ci
npm run build
- name: Unit Tests with Coverage
- name: Integration Tests with Coverage
run: npm run test:coverage

- name: Coverage Report
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ Refactored the app for testability and added a few additional tweaks.

### BE Tests
[![Backend Service Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-service-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-service-tests.yml)
[![Backend Unit Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-unit-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-unit-tests.yml)
[![Backend Integration Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-integration-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-integration-tests.yml)

- Service tests with docker, [supertest](https://github.com/ladjs/supertest) and [vitest](https://vitest.dev/)
- Unit tests with [supertest](https://github.com/ladjs/supertest), [vitest](https://vitest.dev/) and [vitest-mock-extended](https://github.com/eratio08/vitest-mock-extended)
- Integration tests with [supertest](https://github.com/ladjs/supertest), [vitest](https://vitest.dev/) and [vitest-mock-extended](https://github.com/eratio08/vitest-mock-extended)

### Contract Tests
[![Backend Contract Tests](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-contract-tests.yml/badge.svg)](https://github.com/helloitsdave/notes-app-full-stack-testing/actions/workflows/backend-contract-tests.yml)
Expand Down
8 changes: 4 additions & 4 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ npm run docker:down

## Test Execution

### Unit Tests
### Integration Tests

Execute the unit tests
Execute the integration tests

```bash
npm run test
```

### Unit Tests with Coverage
### Integration Tests with Coverage

Execute the unit tests with coverage
Execute the integration tests with coverage

```bash
npm run test:coverage
Expand Down
4 changes: 2 additions & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "dist/index.js",
"scripts": {
"test:service": "npx vitest **/service/*.spec.ts",
"test:unit": "npx vitest -c ./vitest.config.unit.mts",
"test:coverage": "npx vitest **/unit/*.spec.ts --coverage",
"test:integration": "npx vitest -c ./vitest.config.integration.mts",
"test:coverage": "npx vitest **/integration/*.spec.ts --coverage",
"test:contract": "npx vitest --testTimeout 30000 **/contract/*.spec.ts",
"start:local": "npx nodemon",
"start": "node dist/index.js",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const isCI = process.env.CI === "true";

export default defineConfig({
test: {
include: ['tests/unit/*.spec.ts'],
include: ['tests/integration/*.spec.ts'],
coverage: {
provider: 'istanbul', // or 'v8'
reporter: isCI ? ["lcov", "text-summary"] : ["text","text-summary"],
Expand Down

0 comments on commit 19c365d

Please sign in to comment.