Skip to content

Commit

Permalink
ch(setup testing environment):
Browse files Browse the repository at this point in the history
added jest.config file
wrote one simple test that passes
[Finishes #169258568]
  • Loading branch information
NiyongaboEric authored and hezzie committed Dec 27, 2019
1 parent 0587d57 commit a41f501
Show file tree
Hide file tree
Showing 15 changed files with 755 additions and 58 deletions.
12 changes: 11 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,14 @@ jobs:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: npm test
# run tests!
- run:
name: run tests
command: |
export COVERALLS_REPO_TOKEN=lfiAmCYD9ESrFrE3vNyYoKriiCUIskuaa >> $BASH_ENV
npm test
npm run coveralls
- store_artifacts:
path: coverage
destination: coverage

File renamed without changes.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist
package-lock.json
.DS_Store
config/
coverage/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[![Coverage Status](https://coveralls.io/repos/github/andela/team-odd-bn-frontend/badge.svg?branch=develop)](https://coveralls.io/github/andela/team-odd-bn-frontend?branch=develop)
[![Maintainability](https://api.codeclimate.com/v1/badges/6a767cde4f78e69ece3c/maintainability)](https://codeclimate.com/github/andela/team-odd-bn-frontend/maintainability)
# Barefoot Nomad

19 changes: 19 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
clearMocks: true,
collectCoverageFrom: [
'src/**/*.js',
'!src/index.js',
'!data/keyMap.js',
'!/node_modules/',
],
coverageDirectory: 'coverage',
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/src/testConfigurations/__mocks__/fileMock.js',
'\\.(css|scss)$': 'identity-obj-proxy',
},
setupFiles: [
'<rootDir>/src/testConfigurations/setupTests.js',
],
testEnvironment: 'jsdom',
};
Loading

0 comments on commit a41f501

Please sign in to comment.