Freecodecamp: ES6: Understand the Differences Between import and require

Created on 28 May 2017  路  4Comments  路  Source: freeCodeCamp/freeCodeCamp

Challenge understand-the-differences-between-import-and-require has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3113.0 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

import { capitalizeString } from "string_functions";

capitalizeString("hello!");

Most helpful comment

I can also confirm issues with this challenge. As above, the import keyword does not appear to be working. I am running:

import { capitalizeString } from "string_functions";
capitalizeString("hello!");

And the error given is this:

//running tests
"require is not defined"
//tests completed

assert(code.match(/import\s+\{\s?capitalizeString\s?\}\s+from\s+"string_functions"/ig)

All 4 comments

I'm seeing this in the assertions. Seems to be an error with the data.

assert(code.match(/import\s+\{\s?capitalizeString\s?\}\s+from\s+"string_functions"/ig)

I can also confirm issues with this challenge. As above, the import keyword does not appear to be working. I am running:

import { capitalizeString } from "string_functions";
capitalizeString("hello!");

And the error given is this:

//running tests
"require is not defined"
//tests completed

assert(code.match(/import\s+\{\s?capitalizeString\s?\}\s+from\s+"string_functions"/ig)

same

Hi everybody! Thanks for reporting and looking into this issue.

We're working on fixing the ES6 challenges in https://github.com/freeCodeCamp/freeCodeCamp/issues/12698. I'm closing this issue in favor of that.

Happy coding!

Was this page helpful?
0 / 5 - 0 ratings