├── .gitignore ├── .vscode └── settings.json ├── src ├── index.ts └── index.spec.ts ├── tsconfig.json ├── README.md ├── package.json └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /coverage -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true 3 | } 4 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | const sum = (a: number, b: number): number => a + b; 2 | 3 | export default sum; 4 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es2015", "dom"] 5 | }, 6 | "include": ["src/**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from "vitest"; 2 | import sum from "."; 3 | 4 | test("adds 1 + 2 to equal 3", () => { 5 | expect(sum(1, 2)).toBe(3); 6 | }); 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # js-kata-starter 2 | 3 | Starter project for kata (Node, TypeScript, Vitest) 4 | 5 | ## Getting started 6 | 7 | - **Fork**, then clone the repository 8 | - Install dependencies 9 | - Start developing (`npm test`) 10 | 11 | ## Documentation 12 | 13 | https://vitest.dev/ 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-kata-starter", 3 | "version": "1.0.0", 4 | "description": "Starter project for kata (Node, TypeScript, Vitest, fast-check, ts-node)", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "vitest", 8 | "format": "prettier --write \"src/**/*.ts\"" 9 | }, 10 | "devDependencies": { 11 | "fast-check": "^4.4.0", 12 | "prettier": "^3.7.4", 13 | "ts-node": "^10.9.2", 14 | "typescript": "^5.9.3", 15 | "vitest": "^4.0.16" 16 | }, 17 | "prettier": { 18 | "printWidth": 120 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "git+https://github.com/mathieueveillard/js-kata-starter.git" 23 | }, 24 | "keywords": [ 25 | "starter", 26 | "project", 27 | "kata", 28 | "node", 29 | "typescript", 30 | "vitest", 31 | "fast-check", 32 | "pbt", 33 | "ts-node" 34 | ], 35 | "author": "Mathieu Eveillard", 36 | "license": "MIT", 37 | "bugs": { 38 | "url": "https://github.com/mathieueveillard/js-kata-starter/issues" 39 | }, 40 | "homepage": "https://github.com/mathieueveillard/js-kata-starter#readme" 41 | } 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Mathieu Eveillard 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------