Compose-ready workspace: packages/zappier (rate card, portal, Stripe), packages/verae-zapier-middleware (timestamp + NATS), packages/verae-zapier (CLI app), vendor/zapier-platform, and research/zapier vendor corpus. Gate 0 structure checks pass. Product code and research are not yet wired.
33 lines
820 B
JavaScript
33 lines
820 B
JavaScript
/* globals describe, it */
|
|
|
|
const should = require('should'); // required to use .exist()
|
|
|
|
const zapier = require('zapier-platform-core');
|
|
|
|
const App = require('../index');
|
|
const appTester = zapier.createAppTester(App);
|
|
|
|
describe('searches', () => {
|
|
describe('search recipe', () => {
|
|
it('should find a recipe', (done) => {
|
|
const bundle = {
|
|
inputData: {
|
|
style: 'style 2',
|
|
},
|
|
};
|
|
|
|
appTester(App.searches.recipe.operation.perform, bundle)
|
|
.then((results) => {
|
|
results.length.should.be.aboveOrEqual(1);
|
|
|
|
const firstRecipe = results[0];
|
|
firstRecipe.style.should.eql('style 2');
|
|
should.exist(firstRecipe.name);
|
|
should.exist(firstRecipe.directions);
|
|
|
|
done();
|
|
})
|
|
.catch(done);
|
|
});
|
|
});
|
|
});
|