summaryrefslogtreecommitdiff
path: root/async/features/steps/async.js
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2018-11-10 20:06:38 +0100
committerEugen Wissner <belka@caraus.de>2018-11-10 20:06:38 +0100
commit15e5e413d9a49012202c46f8fde747c1593ec0f1 (patch)
treeb790d38e296e2979ce9b048f57852a04bba401ff /async/features/steps/async.js
parent5d535973f330ede481f0bf2906ec187d726ddf80 (diff)
downloadcucumber-js-demo-15e5e413d9a49012202c46f8fde747c1593ec0f1.tar.gz
Add code
Diffstat (limited to 'async/features/steps/async.js')
-rw-r--r--async/features/steps/async.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/async/features/steps/async.js b/async/features/steps/async.js
new file mode 100644
index 0000000..ea88856
--- /dev/null
+++ b/async/features/steps/async.js
@@ -0,0 +1,9 @@
+import { When } from 'cucumber'
+import axios from 'axios'
+
+When('I request the same resource twice', async function () {
+ const url = 'http://localhost:8080/'
+
+ this.first = await axios.request(url).data
+ this.second = await axios.request(url).data
+})