Skip to content

Commit

Permalink
Update typechecking and testing config
Browse files Browse the repository at this point in the history
* Make typechecking stricter, and have it apply for the `test/`
  directory
* Only run tests with `*.test*` in their name, so that Jest doesn't
  try to run the `dataset.ts` file
  • Loading branch information
brimtown committed Oct 22, 2020
1 parent e7f0bd4 commit 4396695
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
10 changes: 8 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed
* under the Apache 2.0 license (see LICENSE).
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020 Datadog, Inc.
*/

module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['<rootDir>/test/**/*.[jt]s']
testMatch: ['<rootDir>/test/**/*.test.[jt]s']
};

7 changes: 7 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed
* under the Apache 2.0 license (see LICENSE).
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020 Datadog, Inc.
*/

module.exports = {
printWidth: 80,
tabWidth: 4,
Expand Down
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
"module": "commonjs",
"declaration": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist"
},
"include": [
"./src"
"./src", "./test"
]
}

0 comments on commit 4396695

Please sign in to comment.