question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Valid data does not pass the test.

See original GitHub issue

Challenge Modify Array Data With Indexes has an issue. User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

// Example
var ourArray = [1,2,3];
ourArray[1] = 3; // ourArray now equals [1,3,3].

// Setup
var myArray = [1,2,3];

// Only change code below this line.
myArray [0] = 3;


While myArray [0] is valid js syntax this code doesn’t pass the tests because the test for use of brackets doesn’t allow that space.

recommend /myArray\s+[0]\s+=.*/ as a better test that allows for the space but still doesn’t allow for the reassignment of the array

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
l-tongcommented, Sep 20, 2016

I will give it a try on fixing it as a first-timer.

0reactions
karuppiah7890commented, Sep 24, 2016

OK. Somehow I guessed that I have to run the

npm run only-once

command again, even though it says “only-once”. Since the output for the first time said some files were parse. Even this time the output said some files were parsed. And the file names were related to the names of the JSON files in the seed/challenges/ folder.

Is it like the JSON files are parsed and put in the mongodb server ? And the site shows the data of the challenges from the database server ?

EDIT 1: Looks like I need to learn more about MongoDB to get into the database and see stuff. I tried traversing into challenge db using show dbs and use xyz. But wasn’t able to see stuff.

EDIT 2: OK. I checked out properly on how to lookup data in MongoDB and found that all the data was getting store in it, inside freecodecamp DB, inside challenge collection. I basically did this

>show dbs
>use freecodecamp
>show collections
>db.challenge.find()
>db.challenge.find({"title": "Access Array Data with Indexes"})

So, looks like whenever I run npm run only-once command, the JSON files in /seed/challenges ( and may be some more folders too) folder will be parsed and put in the DB anew. Especially this is necessary when I change the JSON files.

So, what is actually happening when I run the npm run only-once command ? Can anyone explain ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reliability and Validity - Testing and Assessment - HR-Guide
You cannot draw valid conclusions from a test score unless you are sure that the test is reliable. Even when a test is...
Read more >
Statistical Significance Does Not Equal Validity (or Why You ...
When your testing says that you've reached a 95% or even 99% confidence level, that doesn't mean that you have a winning variation....
Read more >
Best handling if data does not pass validation test
Display results sheets no matter what, but make it so that formulas will not recalculate until validation test is passed.
Read more >
Reliability vs. Validity in Research | Difference, Types ... - Scribbr
A valid measurement is generally reliable: if a test produces accurate results, they should be reproducible. Table of contents. Understanding ...
Read more >
Reliability vs. Validity: Key Testing Differences | Wonderlic
As you'd expect, a test cannot be valid unless it's reliable. However, a test can be reliable without being valid. Let's unpack this,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found