Welcome to the Linux Foundation Forum!

Lab 3.1 not working as expected

ariel15584
ariel15584 Posts: 4
edited October 2020 in LFW212 Class Forum

Validate.js is not running on Windows. I had to modify "npm" to "npm.cmd" for spawning the server spawn("npm.cmd", ["start"] ...

Also in the dataCheck function (windows and linux), content is an array buffer and data is a string, so, those will never be equal. Maybe I'm missing something?

Other issue I've found is that the spawned process is never terminated, I had to kill the process to verify again.

Comments

  • I am having the same issue with dataCheck. Have to use content.toString() to get the test pass...

  • MauroColella
    MauroColella Posts: 1
    edited October 2020

    Same issue. Lab 3.2 is also not working.

    Test 1 expects a 200 code, congratulates me about a 404.
    Test 2 tests for /foo, but the definition requires /

  • Can confirm the reports on Labs 3.1 and 3.2. Running Ubuntu 20.04 LTS here

  • @funnytao said:
    I am having the same issue with dataCheck. Have to use content.toString() to get the test pass...

    Yeah i had to do the same. At line 36 of the validate.js there is not conversion of the buffer to a string.

  • thanks for the feedback everyone, fixes for all of this are incoming. @ariel15584 did you find other exercises using spawn('npm'... broke on windows?

  • @davidmarkclements I've tried only three labs and all failed on windows, after that, I did all other labs on Linux. Probably all of them have the same issue.

  • soerson
    soerson Posts: 1
    edited November 2020

    @funnytao said:
    I am having the same issue with dataCheck. Have to use content.toString() to get the test pass...

    I've got the same issue on MacOS. content is a Buffer and the strict assertion fails. Don't think it is spesific for some platform

  • this should have been fixed by now. I'm resending the fix for this.

  • Where can I get the fix?
    I checked course resource, latest version dated 2020-11-05

  • mstepien
    mstepien Posts: 473

    Hi @chesterheng,

    Updated course resources should be available within the next 24 hours.

    Thank you,
    Magda
    The Linux Foundation Training Team

Categories

Upcoming Training