-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheventsCheck_test.js
More file actions
53 lines (45 loc) · 1014 Bytes
/
eventsCheck_test.js
File metadata and controls
53 lines (45 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require('dotenv').config();
const { Firestore } = require('@google-cloud/firestore');
const firestore = new Firestore();
var member = {
firstName: 'Brett',
lastName: 'Slaski',
email: 'brett@thatconference.com',
};
var order = {
id: 'brett123',
orderType: 'PARTNER',
event: 'THATConferenceTexas2023',
lineItems: [
{
productId: 'oQ5aMEMaTV48E6lGrUCt',
quantity: 1,
isBulkPurchase: false,
},
],
};
var orderAllocations = [
{
event: 'THATConferenceTexas2023',
productType: 'TICKET',
eventActivities: ['CAMPER'],
//eventActivities: ['EXPO_HALL'],
allocatedTo: 'brett|abc',
},
];
var products = [
{
productId: 'oQ5aMEMaTV48E6lGrUCt',
name: 'Camper (test)',
},
];
var constants = require('./__build__/constants').default;
var OrderEvent = require('./__build__/lib/events/orders').default;
var oe = OrderEvent();
oe.emit(constants.ORDER_EVENT_EMITTER.ORDER_CREATED, {
firestore,
products,
order,
orderAllocations,
member,
});