summaryrefslogtreecommitdiff
path: root/async/features/support/hooks.js
blob: 00ac749b76d5560dad571f7b4ffe43a07b466994 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { BeforeAll, AfterAll } from '@cucumber/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()
})