Add code
This commit is contained in:
20
async/features/support/hooks.js
Normal file
20
async/features/support/hooks.js
Normal file
@ -0,0 +1,20 @@
|
||||
import { BeforeAll, AfterAll } from 'cucumber'
|
||||
import express from 'express'
|
||||
|
||||
let server
|
||||
|
||||
BeforeAll(function () {
|
||||
const app = express()
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.send('Alea iacta est')
|
||||
})
|
||||
|
||||
server = app.listen(8080)
|
||||
})
|
||||
|
||||
AfterAll(function () {
|
||||
server.close()
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user