Tech
A test said the server started. I deleted the server. It still passed.
Here is a test from a real, well run Node project:
test ( ' server starts ' , async ( t ) => {
const app = build ()
await app . listen ({ port : 0 })
t . assert . ok ( true , ' server started ' )
})
It reads fine in review. It runs green. Now delete the body of build() so the server never comes up. The test is still green, because the only thing it asserts is true . In the same file two more of these caught the...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to