Skip to content

Commit

Permalink
Merge 0eef17c into db36cf2
Browse files Browse the repository at this point in the history
  • Loading branch information
ola357 committed Aug 20, 2019
2 parents db36cf2 + 0eef17c commit 57e6547
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"mocha": true
},
"rules": {
"linebreak-style": ["error", "windows"],
"one-var": 0,
"one-var-declaration-per-line": 0,
"new-cap": 0,
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ cache:
directories:
- "node_modules"
after_success:
- npm run coverage
- npm run coverage
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
=======
# Barefoot Nomad - Making company travel and accomodation easy and convinient.

## Vision
Expand All @@ -7,6 +8,7 @@ Make company global travel and accommodation easy and convenient for the strong
---

[![Build Status](https://travis-ci.com/andela/firestar-backend.svg?branch=stage)](https://travis-ci.com/andela/firestar-backend)
[![Coverage Status](https://coveralls.io/repos/github/andela/firestar-backend/badge.svg?branch=stage)](https://coveralls.io/github/andela/firestar-backend?branch=stage)

[![](https://img.shields.io/badge/Protected_by-Hound-a873d1.svg)](https://houndci.com)

Expand Down
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "A Social platform for the creative at heart",
"main": "index.js",
"scripts": {
"test": "cross-env NODE_ENV=development mocha src/__tests__/* --require @babel/register --require @babel/polyfill",
"test": "cross-env NODE_ENV=development nyc mocha --require @babel/register ./src/__tests__/*.js",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"lint": "eslint \"**/*.js\" --ignore-pattern node_modules/ --fix",
"build": "babel ./src -d dist",
"start": "node dist/index.js",
Expand All @@ -28,7 +29,7 @@
"make-runnable": "^1.3.6",
"method-override": "^2.3.10",
"methods": "^1.1.2",
"mongoose": "^5.2.2",
"mongoose": "^5.6.9",
"mongoose-unique-validator": "^2.0.1",
"morgan": "^1.9.1",
"passport": "^0.4.0",
Expand All @@ -40,20 +41,21 @@
"underscore": "^1.9.1"
},
"devDependencies": {
"coveralls": "^3.0.6",
"eslint": "^6.1.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"chai": "^4.2.0",
"mocha": "^6.2.0",
"nyc": "^14.1.1",
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/node": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-optional-chaining": "^7.2.0",
"@babel/preset-env": "^7.5.5",
"nodemon": "^1.19.1"
"chai": "^4.2.0",
"coveralls": "^3.0.6",
"eslint": "^6.1.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"mocha": "^6.2.0",
"mocha-lcov-reporter": "^1.3.0",
"nodemon": "^1.19.1",
"nyc": "^14.1.1"
}
}
}
3 changes: 2 additions & 1 deletion src/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { equal } from 'assert';
import arrayTest from '../utils/index';

describe('Array', () => {
describe('#indexOf()', () => {
it('should return -1 when the value is not present', () => {
equal([1, 2, 3].indexOf(4), -1);
equal(arrayTest([1, 2, 3], 4), -1);
});
});
});
2 changes: 2 additions & 0 deletions src/utils/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const arrayTest = (array, index) => array.indexOf(index);
export default arrayTest;

0 comments on commit 57e6547

Please sign in to comment.