Skip to content

Commit 1c86208

Browse files
🤖 dprint fmt
1 parent 7f8c058 commit 1c86208

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

types/mparticle__web-sdk/test/mparticle__web-sdk-instance-tests.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -726,55 +726,55 @@ user5.getCart().clear();
726726

727727
mParticle.Rokt.selectPlacements({
728728
attributes: {
729-
'foo': 'bar',
730-
'fizz': 'buzz',
729+
"foo": "bar",
730+
"fizz": "buzz",
731731
},
732732
}).then(selection => {
733733
// Test event subscription patterns
734-
selection.on('PLACEMENT_INTERACTIVE').subscribe(() => {
735-
console.log('Placement interaction');
734+
selection.on("PLACEMENT_INTERACTIVE").subscribe(() => {
735+
console.log("Placement interaction");
736736
});
737737

738-
selection.on('PLACEMENT_COMPLETED').subscribe(event => {
739-
console.log('Placement completed', event);
740-
console.log('Event details:', event.body, event.event, event.placement);
738+
selection.on("PLACEMENT_COMPLETED").subscribe(event => {
739+
console.log("Placement completed", event);
740+
console.log("Event details:", event.body, event.event, event.placement);
741741
});
742742

743743
// Test unsubscription
744-
const unsubscriber = selection.on('PLACEMENT_READY').subscribe(event => {
745-
console.log('Placement ready:', event.placement.id);
744+
const unsubscriber = selection.on("PLACEMENT_READY").subscribe(event => {
745+
console.log("Placement ready:", event.placement.id);
746746
});
747747
unsubscriber.unsubscribe();
748748

749749
// Test selection methods
750750
selection.ready().then(() => {
751-
console.log('Selection is ready');
751+
console.log("Selection is ready");
752752
});
753753

754-
selection.send('custom_event', { data: 'test' });
754+
selection.send("custom_event", { data: "test" });
755755

756756
selection.setAttributes({
757-
'dynamic_attr': 'updated_value',
758-
'user_segment': 'premium'
757+
"dynamic_attr": "updated_value",
758+
"user_segment": "premium",
759759
});
760760

761761
// Test getting individual placements
762762
selection.getPlacements().then(placements => {
763763
placements.forEach(placement => {
764-
console.log('Placement ID:', placement.id);
765-
console.log('Placement element:', placement.element);
764+
console.log("Placement ID:", placement.id);
765+
console.log("Placement element:", placement.element);
766766

767767
// Test placement-specific events
768-
placement.on('PLACEMENT_RENDERED').subscribe(event => {
769-
console.log('Placement rendered:', event);
768+
placement.on("PLACEMENT_RENDERED").subscribe(event => {
769+
console.log("Placement rendered:", event);
770770
});
771771

772772
// Test placement methods
773773
placement.ready().then(() => {
774774
console.log(`Placement ${placement.id} is ready`);
775775
});
776776

777-
placement.send('placement_event', { custom: 'data' });
777+
placement.send("placement_event", { custom: "data" });
778778

779779
// Test placement close events
780780
placement.onClose().then(() => {
@@ -794,25 +794,25 @@ mParticle.Rokt.selectPlacements({
794794

795795
// Test other Rokt methods
796796
mParticle.Rokt.hashAttributes({
797-
798-
userId: '12345',
799-
segment: 'premium'
797+
798+
userId: "12345",
799+
segment: "premium",
800800
}).then(hashedAttrs => {
801-
console.log('Hashed attributes:', hashedAttrs);
801+
console.log("Hashed attributes:", hashedAttrs);
802802
});
803803

804804
mParticle.Rokt.setExtensionData({
805-
'analytics': { sessionId: 'abc123' },
806-
'personalization': { variant: 'A' }
805+
"analytics": { sessionId: "abc123" },
806+
"personalization": { variant: "A" },
807807
});
808808

809809
// Test with identifier
810810
mParticle.Rokt.selectPlacements({
811811
attributes: {
812-
'placement_type': 'checkout',
813-
'cart_value': 150.00
812+
"placement_type": "checkout",
813+
"cart_value": 150.00,
814814
},
815-
identifier: 'checkout-flow-2024',
815+
identifier: "checkout-flow-2024",
816816
}).then(selection => {
817-
console.log('Selection with identifier created', selection);
817+
console.log("Selection with identifier created", selection);
818818
});

0 commit comments

Comments
 (0)