【发布时间】:2020-08-25 18:54:33
【问题描述】:
我有一个简单的 hello world 应用程序,我想为它编写一个测试。我是 Nodejs 的新手,所以在入门方面需要帮助
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})
【问题讨论】:
标签: node.js unit-testing npm