-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v3] Use Jest for tests, added code coverage reports #77
Conversation
jest.config.js
Outdated
module.exports = { | ||
coverageDirectory: '.coverage', | ||
collectCoverageFrom: [ | ||
'src/**/*.{js,jsx}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at here can be just .js
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add the coverageThreshold:
coverageThreshold: {
global: {
statements: 97,
branches: 95,
functions: 100,
lines: 97
},
},
this will ensure that if any changes lower the coverage the test builder will trigger an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
congratulations for the PR
jest.config.js
Outdated
module.exports = { | ||
coverageDirectory: '.coverage', | ||
collectCoverageFrom: [ | ||
'src/**/*.{js,jsx}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add the coverageThreshold:
coverageThreshold: {
global: {
statements: 97,
branches: 95,
functions: 100,
lines: 97
},
},
this will ensure that if any changes lower the coverage the test builder will trigger an error
please remove |
I'll fix these points. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add Rollup as task runner (#64) * Add rollup config and remove unused dependencies * Update karma config to use rollup * Use ESModules * Update dist files * Added templates to create pullrequest and issues (#75) * Added templates to create pullrequest and issues * Modify language template * Removed support to bower and add support to yarn (#74) * Removed support to bower and add support to yarn * Remove dist folder and ignore in .gitignore file * Adds new installation instruction * Remove folder dist. * [v3] Use Jest for tests, added code coverage reports (#77) * replace karma with jest * make tests jest compatible * publish coveralls reports in travis * removed dependencies from package.json * removed karma configs * added coverage threshold configs * Export functions instenead of a constructor (#78) * migrating files to functional programming * fix specs files to import the functional lib * updated documentation fro use of functional code * fix example using the functional lib * update package-lock * update dist * adjusting function name sum * Add Prettier as a formatter tool (#80) * Add prettier configuration * Format files with prettier config * Add husky for pre-commit hook * Update libraries to fix vulnerabilities (#81) * Remove dist folder from git and add on npm files (#83) * Cleanup npmignore and add dist file as main files * Remove dist folder * Add dist folder on gitignore * Remove minified file from dist * Create CHANGELOG file with 0.1.2 version (#86) * updating dependencies * dependencies update * Remove yarn lock file * Update dependencies * Update docs * Add bins new bins and cards - New cards: banescard, maxxvan, cabal, goodCard - New bins for mastercard and hipercard * Add bins new bins and cards - New cards: banescard, maxxvan, cabal, goodCard - New bins for mastercard and hipercard * fix false positives on luhn spec * Use a better directory structure * Remove static example * Use Array#find on getCreditCardNameByNumber * Remove mutables values from isSecurityCodeValid * Remove ifs from isExpirationDateValid * Remove mutables values from isValid function * feat: refactor expiration date validation * fix: lint formatter * feat: refactor format full year * feat: config github actions on v3 * feat: refactor security code length validation * feat: add jcb card * feat: add coverage to actions * feat: update dependencies * chore: add release-it config * feat: add tokenref * feat: add conventional changelog * chore: update version * feat: upgrade to a more functional approach BREAKING CHANGE: this version does not require an instance in order to work. Please, check the diff. * feat: add minified package Co-authored-by: Luiz Fernando Rodrigues <fernahh@gmail.com> Co-authored-by: Edmo Lima <devedmo@gmail.com> Co-authored-by: Carlos Roberto Gomes Junior <carlos.rberto@gmail.com> Co-authored-by: Jhon Mike <developer@jhonmike.com.br> Co-authored-by: Lucas F. Bittencurt <lucasfilipeb@gmail.com> Co-authored-by: Ciro Ferreira da Cruz <ciro.cfc@gmail.com> Co-authored-by: Ciro Ferreira da Cruz <ciro.cruz@contaazul.com> Co-authored-by: Guilherme Tavares <zetavares.rib@gmail.com> Co-authored-by: Mateus Craveiro <mccraveiro@gmail.com>
* Add Rollup as task runner (#64) * Add rollup config and remove unused dependencies * Update karma config to use rollup * Use ESModules * Update dist files * Added templates to create pullrequest and issues (#75) * Added templates to create pullrequest and issues * Modify language template * Removed support to bower and add support to yarn (#74) * Removed support to bower and add support to yarn * Remove dist folder and ignore in .gitignore file * Adds new installation instruction * Remove folder dist. * [v3] Use Jest for tests, added code coverage reports (#77) * replace karma with jest * make tests jest compatible * publish coveralls reports in travis * removed dependencies from package.json * removed karma configs * added coverage threshold configs * Export functions instenead of a constructor (#78) * migrating files to functional programming * fix specs files to import the functional lib * updated documentation fro use of functional code * fix example using the functional lib * update package-lock * update dist * adjusting function name sum * Add Prettier as a formatter tool (#80) * Add prettier configuration * Format files with prettier config * Add husky for pre-commit hook * Update libraries to fix vulnerabilities (#81) * Remove dist folder from git and add on npm files (#83) * Cleanup npmignore and add dist file as main files * Remove dist folder * Add dist folder on gitignore * Remove minified file from dist * Create CHANGELOG file with 0.1.2 version (#86) * updating dependencies * dependencies update * Remove yarn lock file * Update dependencies * Update docs * Add bins new bins and cards - New cards: banescard, maxxvan, cabal, goodCard - New bins for mastercard and hipercard * Add bins new bins and cards - New cards: banescard, maxxvan, cabal, goodCard - New bins for mastercard and hipercard * fix false positives on luhn spec * Use a better directory structure * Remove static example * Use Array#find on getCreditCardNameByNumber * Remove mutables values from isSecurityCodeValid * Remove ifs from isExpirationDateValid * Remove mutables values from isValid function * feat: refactor expiration date validation * fix: lint formatter * feat: refactor format full year * feat: config github actions on v3 * feat: refactor security code length validation * feat: add jcb card * feat: add coverage to actions * feat: update dependencies * chore: update version * chore: add release-it config * fix: add right token * fix: change token name * feat: change event trigger * feat: add tokenref * feat: add conventional changelog * chore: return version * chore: update version * feat: upgrade to a more functional approach BREAKING CHANGE: this version does not require an instance in order to work. Please, check the diff. * feat: add minified package Co-authored-by: Luiz Fernando Rodrigues <fernahh@gmail.com> Co-authored-by: Edmo Lima <devedmo@gmail.com> Co-authored-by: Carlos Roberto Gomes Junior <carlos.rberto@gmail.com> Co-authored-by: Jhon Mike <developer@jhonmike.com.br> Co-authored-by: Lucas F. Bittencurt <lucasfilipeb@gmail.com> Co-authored-by: Ciro Ferreira da Cruz <ciro.cfc@gmail.com> Co-authored-by: Ciro Ferreira da Cruz <ciro.cruz@contaazul.com> Co-authored-by: Guilherme Tavares <zetavares.rib@gmail.com> Co-authored-by: Mateus Craveiro <mccraveiro@gmail.com>
Changes in this Pull Request
jest --coverage
(yarn cov
)static-server
to preview code coverage reports (yarn cov:serve
).travis.yml
file)This pull request closes #65.