Milestone 0: import zappier billing, Verae middleware, and Zapier research
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.
This commit is contained in:
commit
b4150c8250
1364 changed files with 6814366 additions and 0 deletions
33
vendor/zapier-platform/example-apps/babel/src/test/index.js
vendored
Normal file
33
vendor/zapier-platform/example-apps/babel/src/test/index.js
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/* globals describe, it */
|
||||
import should from 'should';
|
||||
|
||||
import zapier from 'zapier-platform-core';
|
||||
|
||||
import App from '../index';
|
||||
const appTester = zapier.createAppTester(App);
|
||||
|
||||
describe('My Test', () => {
|
||||
it('should test the auth succeeds', async () => {
|
||||
const bundle = {
|
||||
authData: {
|
||||
username: 'user',
|
||||
password: 'secret',
|
||||
},
|
||||
};
|
||||
|
||||
const response = await appTester(App.authentication.test, bundle);
|
||||
should(response.status).eql(200);
|
||||
response.request.headers.Authorization.should.eql('Basic dXNlcjpzZWNyZXQ=');
|
||||
});
|
||||
|
||||
it('should test the auth fails', () => {
|
||||
const bundle = {
|
||||
authData: {
|
||||
username: 'user',
|
||||
password: 'boom',
|
||||
},
|
||||
};
|
||||
|
||||
return appTester(App.authentication.test, bundle).should.be.rejected();
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue