UNPKG

593 BJavaScriptView Raw
1/* globals describe it */
2const should = require('should');
3
4const zapier = require('zapier-platform-core');
5
6// Use this to make test calls into your app:
7const App = require('../../index');
8const appTester = zapier.createAppTester(App);
9zapier.tools.env.inject();
10
11describe('My App', () => {
12 it('should run <%= TYPE %>s.<%= KEY %>', done => {
13 const bundle = { inputData: {} };
14
15 appTester(App.<%= TYPE_PLURAL %>.<%= KEY %>.<%= MAYBE_RESOURCE %>operation.perform, bundle)
16 .then(results => {
17 should.exist(results);
18 done();
19 })
20 .catch(done);
21 });
22});