cloud-take-home-assignment-2/test/index.test.ts

44 lines
1.2 KiB
TypeScript

describe('myTSTest', () => {
it('should pass', () => {
expect(1).toBe(1);
});
describe('decodePayload', () => {
const properDataBase64 =
'eyJpZCI6ImE0Mzg4MTMyLTE0OTItMTFlYy1hMGIyLWM3OGZmYmQ2OTM0NyIsInBhcnRpdGlvbktleSI6IjJmY2U1M2YxLTFkYWYtNDI0Ny05MjQ1LTBhZDc4ZDBiMGQyZSIsInRpbWVzdGFtcCI6MTYzMTUzODA1OTQ1OSwidHlwZSI6ImJvb2tpbmdfcmVxdWVzdGVkIiwiYm9va2luZ19yZXF1ZXN0ZWQiOnsidGltZXN0YW1wIjoxNjMxNTM4MDU5NDU5LCJvcmRlcklkIjoxMDAxNywicHJvZHVjdF9wcm92aWRlciI6IlN0ZW5hIExpbmUifX0=';
const properDecodedData = {
id: 'a4388132-1492-11ec-a0b2-c78ffbd69347',
partitionKey: '2fce53f1-1daf-4247-9245-0ad78d0b0d2e',
timestamp: 1631538059459,
type: 'booking_requested',
booking_requested: {
timestamp: 1631538059459,
orderId: 10017,
product_provider: 'Stena Line',
},
};
it('should pass', () => {
expect().toEqual(properDecodedData);
});
});
describe('processEvent', () => {
it('should pass', () => {
expect(1).toBe(1);
});
});
describe('transformPayload', () => {
it('should pass', () => {
expect(1).toBe(1);
});
});
describe('handler', () => {
it('should pass', () => {
expect(1).toBe(1);
});
});
});