Use * to Import Everything from a File - Instructions unclear

The output is:

// running test
Properly uses import * as syntax.
// tests completed

But the goals “Properly uses import * as syntax.” is still incomplete.

The instructions say “Add the appropriate import * statement to the top of the file, using the object provided.” But there is no object provided.

Not sure what the issue is. Am I using the wrong object name?

Your code so far


"use strict";
import * as capitalizeStrings from './capitalize_strings';

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use--to-import-everything-from-a-file

I looked over the Github repo for this one. Apparently, below is the correct answer and i just tested it. The test needs, for whatever reason the import to be named ‘myStringModule’.

import * as myStringModule from “capitalize_strings”;

Hope This Helps!!

-Chris

1 Like

Also, the ./ needs to be removed. I guess it’s looking at node_modules instead of a file.

You just add semicolon in line of export and dont use ./, then use any object name it will work. Given in example.

1 Like