Last active
June 14, 2021 12:24
-
-
Save joaovictornsv/25b62efad70e92fc9b6fde6d0473420c to your computer and use it in GitHub Desktop.
π‘ Setup Node Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
"rules": { | |
"camelcase":"off", | |
"no-console":"off", | |
"no-unused-vars": "warn", | |
"class-methods-use-this": "off", | |
"import/prefer-default-export": "off", | |
"import/extensions": [ | |
"error", | |
"always", | |
{ | |
"js": "never" | |
} | |
], | |
"consistent-return": "off" | |
}, | |
"settings": { | |
"import/resolver": { | |
"node": { | |
"extensions": [".js"] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dist | |
node_modules | |
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
'*.js': 'yarn test --findRelatedTests' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
module.exports = { | |
config: path.resolve(__dirname, 'src', 'config', 'database.js'), | |
'migrations-path': path.resolve(__dirname, 'src', 'database', 'migrations') | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// Stop running tests after `n` failures | |
bail: true, | |
// Automatically clear mock calls and instances between every test | |
clearMocks: true, | |
// An array of glob patterns indicating a set of files for which coverage information should be collected | |
collectCoverageFrom: [ | |
'src/controllers/*.js', | |
'src/repositories/*.js', | |
'src/services/*.js', | |
'src/middlewares/*.js', | |
'src/validators/*.js', | |
], | |
// An array of regexp pattern strings used to skip coverage collection | |
coveragePathIgnorePatterns: [ | |
"/node_modules/" | |
], | |
// Indicates which provider should be used to instrument code for coverage | |
coverageProvider: 'v8', | |
// The test environment that will be used for testing | |
testEnvironment: "node", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my_app", | |
"version": "1.0.0", | |
"main": "src/server.js", | |
"license": "MIT", | |
"scripts": { | |
"dev": "nodemon src/server.js", | |
"test": "NODE_ENV=test jest --runInBand --no-cache", | |
"test:coverage": "yarn test --coverage" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment