question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slight change in word for 2nd test of Chain Middleware to Create a Time Server challenge

See original GitHub issue

Describe the Issue

I never paid much attention to it before, but after someone tried to add a setTimeout of 20 seconds to the Chain Middleware to Create a Time Server challenge to pass test 2 (shown below), I think we should modify the wording to make it clear, the user should not purposely make a delay in the call.

The /now endpoint should return a time that is +/- 20 secs from now

Affected Page

https://www.freecodecamp.org/learn/back-end-development-and-apis/basic-node-and-express/chain-middleware-to-create-a-time-server

Your code

n/a

Expected behavior

I was thinking something like the following for a replacement:

The /now endpoint should return the current time.

Screenshots

No response

System

  • Device: [e.g. iPhone 6, Laptop]
  • OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 22]

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ShaunSHamiltoncommented, Jul 18, 2022

To clarify, I am not questioning the need for an assertion approximation. I am questioning the need to mention it in the test text.

0reactions
RandellDawsoncommented, Jul 18, 2022

I am with you now.

Whoever takes this issue on, please change the text to reflect @ShaunSHamilton’s suggestion shown below:

The /now endpoint should return the current time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chain Middleware to Create a Time Serve test failing when ...
I am thinking the issue is that if you attempt to carry on with the same code from the previous challenge it breaks...
Read more >
08 Chain Middleware to Create a Time Server - YouTube
FreeCodeCamp lesson walkthrough - explained.To assist you if you get stuck, and breakdown core concepts the material is trying to convey.
Read more >
Chain Middleware to Create a Time Server - Free Code Camp
In this Basic Node and Express tutorial we chain middleware to create a time server. This is the second part of four sections...
Read more >
Broken Test "Basic Node and Express - Chain Middleware to ...
I'm trying to pass the test with the following solution: app.get('/now', function(req, res, next) { req.time = new Date().
Read more >
Moving from a Test to a Production Environment
You can develop and test applications in a test environment, and then eventually ... Task 2, "Move the Middleware Homes and Domain Configuration...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found