Skip to content

Commit

Permalink
Merge pull request #91 from basti-app/test/unified-unit-test-setup
Browse files Browse the repository at this point in the history
test: unified unit test setup
  • Loading branch information
BohdanPetryshyn authored Sep 16, 2023
2 parents 3cd76cd + 8a66e13 commit bd4f6ed
Show file tree
Hide file tree
Showing 10 changed files with 783 additions and 671 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/node_modules
/dist
/.history
/.history
/.prettierrc.js
/jest.config.js
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',

roots: ['<rootDir>/src'],

clearMocks: true,
};
1,412 changes: 753 additions & 659 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"prepare": "husky install"
},
"devDependencies": {
"@types/jest": "^29.5.5",
"@typescript-eslint/eslint-plugin": "5.37.0",
"eslint": "8.23.1",
"eslint-config-prettier": "8.5.0",
Expand All @@ -17,8 +18,10 @@
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.0.1",
"eslint-plugin-unicorn": "43.0.2",
"husky": "^8.0.0",
"jest": "^29.7.0",
"prettier": "2.7.1",
"typescript": "4.8.3",
"husky": "^8.0.0"
"ts-jest": "^29.1.1",
"typescript": "4.8.3"
}
}
5 changes: 1 addition & 4 deletions packages/basti-cdk/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',

roots: ['<rootDir>/src'],
...require('../../jest.config.js'),
};
5 changes: 1 addition & 4 deletions packages/basti-cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,12 @@
"constructs": "^10.0.5"
},
"devDependencies": {
"@types/jest": "^29.5.3",
"@types/node": "^20.4.2",
"aws-cdk-lib": "2.86.0",
"constructs": "10.0.5",
"jest": "^29.6.1",
"jsii": "^5.1.8",
"jsii-pacmak": "^1.85.0",
"jsii-release": "^0.2.735",
"ts-jest": "^29.1.1"
"jsii-release": "^0.2.735"
},
"files": [
"dist/js",
Expand Down
1 change: 1 addition & 0 deletions packages/basti/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/node_modules
/dist
/.prettierrc.cjs
/jest.config.cjs
/deps
/bin
/.build-deps-tmp
4 changes: 4 additions & 0 deletions packages/basti/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
...require('../../jest.config.js'),
};
3 changes: 2 additions & 1 deletion packages/basti/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"scripts": {
"start": "node bin/run.js",
"test": "npm run check",
"test": "npm run check && npm run test-unit",
"test-unit": "jest",
"build": "npm run build-src && npm run build-deps",
"build-src": "tsc",
"build-src-watch": "tsc --watch",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('connect', () => {
it('should work', () => {
expect(true).toBe(true);
});
});

0 comments on commit bd4f6ed

Please sign in to comment.