Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Return a second element of an array #240

Open
yeashinr opened this issue Feb 9, 2019 · 6 comments
Open

Return a second element of an array #240

yeashinr opened this issue Feb 9, 2019 · 6 comments

Comments

@yeashinr
Copy link
Contributor

yeashinr commented Feb 9, 2019

No description provided.

@kentcdodds
Copy link
Member

Sounds great! 💯

@yeashinr yeashinr changed the title Check Array contains negative value Return a second element of an array Feb 11, 2019
@yeashinr
Copy link
Contributor Author

It is my first commit to an open source project. I follow all the steps in contributing.md.
It runs well until the git commit. Not sure what the error is.

Error message:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: cross-env NODE_ENV=test nyc ava --concurrency 5
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yeashin/.npm/_logs/2019-02-11T22_02_35_051Z-debug.log
ERROR: "test" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] validate: npm-run-all lint test build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] validate script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yeashin/.npm/_logs/2019-02-11T22_02_35_194Z-debug.log
yeashin@Yeashins-MBP::stack-overflow-copy-paste-> cd /Users/yeashin/.npm/_logs/

@kentcdodds
Copy link
Member

Could you paste the output you see above this error message?

@yeashinr
Copy link
Contributor Author

266 passed
2 todo
ERROR: Coverage for lines (99.78%) does not meet global threshold (100%)
ERROR: Coverage for branches (99.14%) does not meet global threshold (100%)
ERROR: Coverage for statements (99.78%) does not meet global threshold (100%)
------------------------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
------------------------------------|----------|----------|----------|----------|----------------|
All files | 99.78 | 99.14 | 100 | 99.78 | |
BitwiseAnd.js | 100 | 100 | 100 | 100 | |
add.js | 100 | 100 | 100 | 100 | |
array-average.js | 100 | 100 | 100 | 100 | |
array-fill.js | 100 | 100 | 100 | 100 | |
array-median.js | 100 | 100 | 100 | 100 | |
checkPalindrome.js | 100 | 100 | 100 | 100 | |
clone.js | 100 | 100 | 100 | 100 | |
contains.js | 100 | 100 | 100 | 100 | |
convert-first-letter-to-capital.js | 100 | 100 | 100 | 100 | |
convertToRoman.js | 100 | 100 | 100 | 100 | |
copyArrayByValue.js | 100 | 100 | 100 | 100 | |
cube.js | 100 | 100 | 100 | 100 | |
curry.js | 100 | 100 | 100 | 100 | |
debounce.js | 100 | 100 | 100 | 100 | |
dec2bin.js | 100 | 100 | 100 | 100 | |
dec2hex.js | 100 | 100 | 100 | 100 | |
descending-order.js | 100 | 100 | 100 | 100 | |
divide.js | 100 | 100 | 100 | 100 | |
endsWith.js | 100 | 100 | 100 | 100 | |
fibonacciSum.js | 100 | 100 | 100 | 100 | |
find.js | 100 | 100 | 100 | 100 | |
first.js | 100 | 100 | 100 | 100 | |
flatten.js | 100 | 100 | 100 | 100 | |
gcd.js | 100 | 100 | 100 | 100 | |
generate-password.js | 100 | 100 | 100 | 100 | |
get-object-size.js | 100 | 100 | 100 | 100 | |
get-ordinal-suffix.js | 100 | 100 | 100 | 100 | |
get-query-string-param.js | 100 | 100 | 100 | 100 | |
get-query-string-value.js | 100 | 100 | 100 | 100 | |
getMiddle.js | 100 | 100 | 100 | 100 | |
hex2hsl.js | 100 | 100 | 100 | 100 | |
hex2rgb.js | 100 | 100 | 100 | 100 | |
inches-to-metric.js | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
init-array.js | 100 | 100 | 100 | 100 | |
is-array.js | 100 | 100 | 100 | 100 | |
is-even.js | 100 | 100 | 100 | 100 | |
is-function.js | 100 | 100 | 100 | 100 | |
is-null-or-whitespace.js | 100 | 100 | 100 | 100 | |
is-numeric.js | 100 | 100 | 100 | 100 | |
is-odd.js | 100 | 100 | 100 | 100 | |
is-prime.js | 100 | 100 | 100 | 100 | |
is-today.js | 100 | 100 | 100 | 100 | |
largest.js | 100 | 100 | 100 | 100 | |
last.js | 100 | 100 | 100 | 100 | |
lcm.js | 100 | 100 | 100 | 100 | |
leap-year.js | 100 | 100 | 100 | 100 | |
less-than.js | 100 | 100 | 100 | 100 | |
makeObjectIterable.js | 100 | 100 | 100 | 100 | |
max.js | 100 | 100 | 100 | 100 | |
mod.js | 100 | 100 | 100 | 100 | |
mode-array.js | 100 | 100 | 100 | 100 | |
multiply.js | 100 | 100 | 100 | 100 | |
numberToString.js | 100 | 100 | 100 | 100 | |
object-values-to-string.js | 100 | 100 | 100 | 100 | |
occurrences.js | 100 | 100 | 100 | 100 | |
pad-left.js | 100 | 100 | 100 | 100 | |
random-integer.js | 100 | 100 | 100 | 100 | |
range.js | 100 | 100 | 100 | 100 | |
reduce-to-tally.js | 100 | 100 | 100 | 100 | |
reduceCount.js | 100 | 100 | 100 | 100 | |
remove-accents.js | 100 | 100 | 100 | 100 | |
remove-duplicates.js | 100 | 100 | 100 | 100 | |
remove-falsy.js | 100 | 100 | 100 | 100 | |
removeElementByIndex.js | 100 | 100 | 100 | 100 | |
removeElementFromArray.js | 100 | 100 | 100 | 100 | |
removeProperty.js | 100 | 100 | 100 | 100 | |
reverse.js | 100 | 100 | 100 | 100 | |
reverseArrayInPlace.js | 100 | 100 | 100 | 100 | |
revstring.js | 100 | 100 | 100 | 100 | |
rollDice.js | 100 | 100 | 100 | 100 | |
round.js | 100 | 100 | 100 | 100 | |
search-and-replace.js | 100 | 100 | 100 | 100 | |
second.js | 66.67 | 50 | 100 | 66.67 | 31 |
shallow-equal.js | 100 | 100 | 100 | 100 | |
slugify.js | 100 | 100 | 100 | 100 | |
snake-to-camel.js | 100 | 100 | 100 | 100 | |
sort-objects-array.js | 100 | 100 | 100 | 100 | |
sqrt.js | 100 | 100 | 100 | 100 | |
square.js | 100 | 100 | 100 | 100 | |
startsWith.js | 100 | 100 | 100 | 100 | |
subtract.js | 100 | 100 | 100 | 100 | |
subtraction.js | 100 | 100 | 100 | 100 | |
sum.js | 100 | 100 | 100 | 100 | |
swap-case.js | 100 | 100 | 100 | 100 | |
swapElements.js | 100 | 100 | 100 | 100 | |
tail.js | 100 | 100 | 100 | 100 | |
temperatureConverter.js | 100 | 100 | 100 | 100 | |
textJustification.js | 100 | 100 | 100 | 100 | |
timeDifference.js | 100 | 100 | 100 | 100 | |
timeSince.js | 100 | 100 | 100 | 100 | |
to-power.js | 100 | 100 | 100 | 100 | |
truncate.js | 100 | 100 | 100 | 100 | |
validateEmail.js | 100 | 100 | 100 | 100 | |
------------------------------------|----------|----------|----------|----------|----------------|

@kentcdodds
Copy link
Member

Looks like it failed because your code coverage isn't 100%. You can determine how to get 100% test coverage by opening coverage/lcov-report/index.html in your browser.

@yeashinr
Copy link
Contributor Author

Thank you. It works 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants