diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000000000000000000000000000000000000..10f82b7b5ed89ca81bad3558d303dcd6895eeb93 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "singleQuote": true, + "tabWidth": 4, + "trailingComma": "all" +} \ No newline at end of file diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000000000000000000000000000000000000..e426591db822d8f55863100b13f8b50761a177da --- /dev/null +++ b/jest.config.js @@ -0,0 +1,6 @@ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + testPathIgnorePatterns: ['/dist/'], + verbose: true, +}; \ No newline at end of file diff --git a/package.json b/package.json index e9b1fbb6f9a47477db45c838d4b9aa3e55ca524f..48874d47af51e297d340774cb34c92fe54fda295 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "Ce repository a été conçu comme la base de ce que sera votre projet Express.js une fois votre setup terminé. Prenez soin de lire chaque étape et ne manquez pas de feuilleter les pages de documentation qui vous sont partagées.", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "npx ts-node-dev src/app.ts", + "format": "prettier --write \"src/**/*.ts\"", + "test": "jest" }, "keywords": [], "author": "", diff --git a/tsconfig.json b/tsconfig.json index e075f973c4d28e6c46f9af9914ab53c5e731a6ce..6bc9e20841200379e94e13c910773aed8faa965d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -55,7 +55,7 @@ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */