Welcome to the Linux Foundation Forum!
Lab 3.1 not working as expected

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.
2
Comments
I am having the same issue with
dataCheck
. Have to usecontent.toString()
to get the test pass...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
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.
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 platformthis 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
Hi @chesterheng,
Updated course resources should be available within the next 24 hours.
Thank you,
Magda
The Linux Foundation Training Team