Skip to content

Commit

Permalink
🔧 update test runner config
Browse files Browse the repository at this point in the history
  • Loading branch information
ulisesantana committed Mar 5, 2021
1 parent dcc4c2c commit d09ec32
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
build
.vscode
.idea
.idea
coverage
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a template repository. So just use the template and once you have your r

## Scripts

```javascript
```json
"prepare": "npm run build",
"prestart": "npm run build",
"start": "node build/index.js",
Expand All @@ -13,23 +13,24 @@ This is a template repository. So just use the template and once you have your r
"lint": "eslint . --ext .ts",
"lint:fix": "npm run lint -- --fix",
"test": "jest --verbose",
"test:tdd": "npm t -- --watchAll"
"test:watch": "npm t -- --watchAll",
"test:coverage": "npm t -- --coverage"
```

## Test config

```javascript
```json
{
"roots": [
"<rootDir>/src"
],
"testMatch": [
"**/__tests__/**/*.+(ts|js)",
],
"testMatch": [
"**/__tests__/**/*.+(ts|js)",
"**/?(*.)+(spec|test).+(ts|js)"
],
"transform": {
],
"transform": {
"^.+\\.(ts)?$": "ts-jest"
}
}
}
```

Expand Down
7 changes: 0 additions & 7 deletions jest.config.js

This file was deleted.

12 changes: 12 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"roots": [
"<rootDir>/src"
],
"testMatch": [
"**/__tests__/**/*.+(ts|js)",
"**/?(*.)+(spec|test).+(ts|js)"
],
"transform": {
"^.+\\.(ts)?$": "ts-jest"
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"lint": "eslint . --ext .ts",
"lint:fix": "npm run lint -- --fix",
"test": "jest --verbose",
"test:tdd": "npm t -- --watchAll"
"test:watch": "npm t -- --watchAll",
"test:coverage": "npm t -- --coverage"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -46,4 +47,4 @@
"ts-jest": "^26.1.3",
"typescript": "^3.9.7"
}
}
}

0 comments on commit d09ec32

Please sign in to comment.