summaryrefslogtreecommitdiff
path: root/async/features/support
diff options
context:
space:
mode:
Diffstat (limited to 'async/features/support')
-rw-r--r--async/features/support/hooks.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/async/features/support/hooks.js b/async/features/support/hooks.js
new file mode 100644
index 0000000..c86df1e
--- /dev/null
+++ b/async/features/support/hooks.js
@@ -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()
+})
+
+