Comments (3)
Good point on the invisible variables. @terakilobyte, could we print out variables declared in the tests? I didn't realize they wouldn't be visible.
Otherwise, yes, we can make the assertions obvious. There is no need for them to be in variables.
from freecodecamp.
Looking at the json for this challenge revealed this.
"var numbers = [10, 20, 30, 40, 50], num = 35;",
"var indexForNum = where(numbers, num);",
"assert.equal(indexForNum, 3, '35 should be inserted at index 3');",
"var indexFor30 = where(numbers, 30);",
"assert.equal(indexFor30, 2, '30 should be inserted at index 2');"
If you mean print out the variables created as part of the test, no, there's no meaningful way to print those out separately. This bonfire needs to be rewritten to show the test case as part of the test, rather than whisking them away in a variable. I'll close this issue once I've done so.
from freecodecamp.
The challenge has been updated to be more descriptive, and the tests have been rewritten to use expect instead of assert. A style guide would be greatly useful (wink wink to one of you) specifying that all bonfires should have additional information and no tests should use assert as they become quite long with the output text where as it's built into expect/should.
from freecodecamp.
Related Issues (20)
- Most starred Github ever!!
- Update certification footer for exam-based certifications HOT 4
- Help issue: searching for topic from coding pages HOT 3
- Create new step tool doesn't keep challenge type
- Hindi Language Support HOT 1
- update logic and tests for step 29 of football team cards project
- Unclear guidance in Step 8: Web Dev Quiz Project HOT 6
- Learn code
- *Hellow world *1000000000
- Researched Issue: JavaScript Algorithms and Data Structures (Beta), "Exercise": Learn Intermediate OOP by Building a Platform Game Step 86 HOT 3
- update wording for step 24 of football team cards project HOT 1
- Update step 74 of spreadsheet project HOT 5
- Missing test: Learn String Manipulation by Building a Cipher HOT 3
- Enhancement request: making the progress bar more visible HOT 1
- Learn Advanced Array Methods by Building a Statistics Calculator - Step 27 -- Not _really_ a duplicate HOT 4
- Building a Spam Filter (Step 10): Passes with incorrect values if right-hand side of `|` is empty
- Update step 1 of cafe menu project HOT 6
- Use contraction in task 150, 154, and 155 of Learn Greetings in your First Day at the Office HOT 1
- Add LinkedIn Credential ID parameter to LinkedIn button
- Update step 6 of TODO project to allow for multiple correct answers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freecodecamp.