From 0a1648bf47490b312169c531aeb51ef4725e8d2e Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Tue, 30 Jan 2018 12:39:31 -0500 Subject: Saying goodbye to graphcool --- graphcool-old/src/createCharge.test.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 graphcool-old/src/createCharge.test.js (limited to 'graphcool-old/src/createCharge.test.js') diff --git a/graphcool-old/src/createCharge.test.js b/graphcool-old/src/createCharge.test.js new file mode 100644 index 0000000..65dde47 --- /dev/null +++ b/graphcool-old/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