[beta] ES6: Export: One of Import's siblings - Tests not passing
See original GitHub issueChallenge export-one-of-imports-siblings has an issue.
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36
.
export const foo = "bar";
export const boo = 'far';
I’m unable to make the tests pass for this challenge, even though the code is correct.
The strange thing is that the tests seem to work when eval()
ed in a normal browser console.
However, they don’t work in the freeCodeCamp environment.
I initially assumed this was a regex error but since they work in the console, I’m not sure anymore.
Another thing worth noting is that these tests have the same problem as i pointed out in #12739 (comment)
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
javascript - ES6 unit testing - importing and exporting modules
ES6 Modules allow you to keep you code isolated. By not placing the class Calculator in the global scope you can reference a...
Read more >Tree-shaking with webpack 2 and Babel 6 - 2ality
First, all ES6 module files are combined into a single bundle file. In that file, exports that were not imported anywhere are not...
Read more >Are most people not using ESM (import/export) syntax even in ...
All I want is this: A test framework that supports ESM syntax. The ability to run and debug these tests in VSCode. The...
Read more >Module Federation - webpack
A chunk loading operation is usually an import() call, but older constructs like require.ensure ... Sibling containers cannot override each other's modules.
Read more >Changelog - Cypress Documentation
Fixed an issue where the query object was not available on requests from cy.intercept() once ... Cypress 10 now includes beta support for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
While
export
is valid es.next syntax, it is currently unsupported by all browsers. The reason for this is that while the syntax has entered the spec, the actual importing of those files has not been defined yet.In order to teach the syntax we will need to encode those instances of syntax into something that is currently valid javascript (probably a coded comment) and then test for the existence of that comment.
I am pretty sure this issue is caused by our transpilation of the code from ES6 to ES5. Since the code we’re running tests against doesn’t have the ES6 code, they can never pass for the regex-tests checking for ES6 syntax.