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
47
vendor/zapier-platform/example-apps/onedrive/test/hydrators.js
vendored
Normal file
47
vendor/zapier-platform/example-apps/onedrive/test/hydrators.js
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
require('should');
|
||||
|
||||
const zapier = require('zapier-platform-core');
|
||||
|
||||
const testUtils = require('./test-utils');
|
||||
const App = require('../index');
|
||||
const appTester = zapier.createAppTester(App);
|
||||
|
||||
const TEST_RESOURCES = testUtils.TEST_RESOURCES;
|
||||
|
||||
describe('Hydrators', () => {
|
||||
before(testUtils.globalBeforeSetup);
|
||||
|
||||
it('should get file contents', (done) => {
|
||||
const bundle = {
|
||||
authData: {
|
||||
access_token: process.env.ACCESS_TOKEN,
|
||||
},
|
||||
inputData: {
|
||||
id: TEST_RESOURCES.root.id,
|
||||
},
|
||||
};
|
||||
|
||||
appTester(App.hydrators.getFileContents, bundle)
|
||||
.then((fileContents) => {
|
||||
fileContents.length.should.above(0);
|
||||
done();
|
||||
})
|
||||
.catch(done);
|
||||
});
|
||||
|
||||
it('should get unicode file contents', (done) => {
|
||||
// CODE TIP: Hydrating files often involves touching the raw bytes (and
|
||||
// handling the file names), so it's a good idea to test different edge cases
|
||||
done();
|
||||
});
|
||||
|
||||
it('should not get file contents for big files', (done) => {
|
||||
// An example edge case that would be worth testing
|
||||
done();
|
||||
});
|
||||
|
||||
it('should not get file contents for binary files', (done) => {
|
||||
// An example edge case that would be worth testing
|
||||
done();
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue