TheOdinProject / javascript-exercises

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tempConversion spec doesn't support destructuring

awkircher opened this issue · comments

It seems like Jasmine doesn't support the syntax:

const {ftoc, ctof} = require (./tempConversion)

When trying to test my code, I got a syntax error for the opening {

Changing the syntax to the following fixed the issue:

const helpers = require('./tempConversion')
const ftoc = helpers.ftoc
const ctof = helpers.ctof

Sorry nobody got back to you! This doesn't appear to be the case, I just tested it and it seems to work just fine. I know it has been a while, but if you could revisit this and perhaps provide a screenshot, that would be great. I can only imagine this would be thrown if the spec file was altered, or perhaps one was on a very, very old version of Node, as Node has supported ES6 destructuring for quite some time.

I'll reopen this if this appears to be an issue, but it shouldn't be.