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
43
vendor/zapier-platform/packages/schema/test/functional-constraints/matchingKeys.js
vendored
Normal file
43
vendor/zapier-platform/packages/schema/test/functional-constraints/matchingKeys.js
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
'use strict';
|
||||
|
||||
require('should');
|
||||
const schema = require('../../schema');
|
||||
|
||||
describe('matchingKeys', () => {
|
||||
it("should error if the keys don't match", () => {
|
||||
const definition = {
|
||||
version: '1.0.0',
|
||||
platformVersion: '1.0.0',
|
||||
triggers: {}, // this should be harmlessly skipped
|
||||
creates: {
|
||||
foo: {
|
||||
key: 'bar', // this is different than above, which shouldn't validate
|
||||
noun: 'Foo',
|
||||
display: {
|
||||
label: 'Create Foo',
|
||||
description: 'Creates a...',
|
||||
},
|
||||
operation: {
|
||||
perform: '$func$2$f$',
|
||||
sample: { id: 1 },
|
||||
inputFields: [
|
||||
{ key: 'orderId', type: 'number' },
|
||||
{
|
||||
key: 'line_items',
|
||||
children: [
|
||||
{
|
||||
key: 'product',
|
||||
type: 'string',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const results = schema.validateAppDefinition(definition);
|
||||
results.errors.should.have.length(1);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue