From 0f1b9240bbd05b377e868faf78b89b509a3d7537 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Fri, 27 Oct 2017 13:24:41 -0400 Subject: ayeee --- graphcool/src/createCharge.test.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 graphcool/src/createCharge.test.js (limited to 'graphcool/src/createCharge.test.js') diff --git a/graphcool/src/createCharge.test.js b/graphcool/src/createCharge.test.js new file mode 100644 index 0000000..65dde47 --- /dev/null +++ b/graphcool/src/createCharge.test.js @@ -0,0 +1,23 @@ +const takeMoney = require('./createCharge'); + +const event = { + "data": { + "user": "cj6ntm8qic3260140vkuzif9d", + "token": "tok_visa", + }, + "context": { + "headers": {} + } +} + + +describe('Take Money', () => { + + test('A charge has come back', async () => { + const res = await takeMoney(event); + console.log(res); + expect(res.data.amount).toBeGreaterThanOrEqual(0); + }); + +}); + -- cgit v1.3