Use the .env File exercise: it changes as aspected but the test doesn't pass. Why?

Tell us what’s happening:
Hi! I am doing this exercise and the JSON response becomes uppercase as aspected but I don’t know why the test doesn’t pass. Can you check why is it wrong? Am I doing it wrong? I checked also the solution but I don’t get why it doesn’t pass

  app.get("/json", (req, res)=>{
    if (process.env.MESSAGE_STYLE==="uppercase"){
        var response = "Hello json".toUpperCase(); 
        res.json({"message": response});
    } else {
        var response = "Hello json";
        res.json({"message": response});

Your browser information:

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

Challenge: Use the .env File

Link to the challenge:

you have shared a link to your repl that invites other to join and make changes, maybe you want to delete that link to avoid vandalism

for the tests not passing, check this:

I see, I didn’t think about it. I’ll do

the link to share is just the link you also have in the browser url bar

Thank you for both answers! I check the answers there.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.