Tests not working?

I don’t know, what to do, I wrote what challenge asked and it seems to work, but I can’t pass the tests.
Here is the code from myApp.js:

var express = require('express');
var app = express();

app.get("/json", (req, res)=>{
  let message = "Hello Json"

  res.json({"Message": process.env.MESSAGE_STYLE == "uppercase" ? message.toUpperCase() : message})
})

 module.exports = app;

and from .env file:

MESSAGE_STYLE=uppercase

Challenge: Use the .env File

Link to the challenge:

your capitalization doesn’t match the required one:

{"message": "HELLO JSON"}

Well, I changed “Message” to “message” but it still doesn’t work.

Okay, the problem was in “Hello Json” - it was supposed to be "Hello json.

1 Like

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