feat(#3): implement initial public API tests

This commit is contained in:
tiagosiebler
2021-06-24 00:26:52 +01:00
parent b4614a71bb
commit f8fcb83628
7 changed files with 3923 additions and 5 deletions

27
jest.config.js Normal file
View File

@@ -0,0 +1,27 @@
// jest.config.js
module.exports = {
rootDir: './',
globals: {
__DEV__: true,
__PROD__: false
},
testEnvironment: 'node',
preset: "ts-jest",
verbose: true, // report individual test
bail: false, // enable to stop test when an error occur,
moduleDirectories: ['node_modules', 'src', 'test'],
testMatch: ['**/test/**/*.test.ts?(x)'],
testPathIgnorePatterns: ['node_modules/', 'dist/', '.json'],
collectCoverageFrom: [
'src/**/*.ts'
],
coverageThreshold: {
// coverage strategy
global: {
branches: 80,
functions: 80,
lines: 50,
statements: -10
}
}
};