@event-inc/link-backend
Version:
Event Inc is a fully managed event bus lets you send and receive data across mission-critical cloud apps, databases and warehouses.
27 lines (23 loc) • 794 B
text/typescript
import { makeId } from "@event-inc/utils";
import { createClient } from "../client";
import { createLinkToken } from "../logic";
require('dotenv').config();
jest.setTimeout(30000);
describe('Link APIs Specs', () => {
it('Should create a Link token', async () => {
const client = createClient(
process.env.BUILDABLE_SECRET_KEY,
{
baseUrl: process.env.EVENT_INC_API_BASE_URL
}
);
const linkToken = await createLinkToken(client, {
connectionType: "source",
type: "stripe",
group: `my-stripe-source-${makeId(4)}`,
label: `My Stripe Source ${makeId(4)}`,
ttl: 24 * 60 * 60 * 1000,
});
expect(linkToken).toHaveProperty('token');
});
});