Skip to content

Commit 4bcc0b6

Browse files
Address PR Comments
1 parent b03d93e commit 4bcc0b6

1 file changed

Lines changed: 3 additions & 18 deletions

File tree

test/src/tests.js

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ describe('Rokt Forwarder', () => {
8686
return [];
8787
};
8888
mParticle.generateHash = function (input) {
89-
console.warn('Rokt Kit: generateHash', input);
9089
return 'hashed-<' + input + '>-value';
9190
};
9291
// -------------------START EDITING BELOW:-----------------------
@@ -721,20 +720,6 @@ describe('Rokt Forwarder', () => {
721720
await window.mParticle.forwarder.init(
722721
{
723722
accountId: '123456',
724-
placementEventMapping: JSON.stringify([
725-
{
726-
jsmap: '-1484452948',
727-
map: '-5208850776883573773',
728-
maptype: 'EventClass.Id',
729-
value: 'foo-mapped-flag',
730-
},
731-
{
732-
jsmap: '1838502119',
733-
map: '1324617889422969328',
734-
maptype: 'EventClass.Id',
735-
value: 'ad_viewed_test',
736-
},
737-
]),
738723
},
739724
reportService.cb,
740725
true
@@ -1835,7 +1820,7 @@ describe('Rokt Forwarder', () => {
18351820
value: 'foo-mapped-flag',
18361821
},
18371822
{
1838-
jsmap: 'hashed-<29Other Value-value',
1823+
jsmap: 'hashed-<29Other Value>-value',
18391824
map: '1279898989',
18401825
maptype: 'EventClass.Id',
18411826
value: 'ad_viewed_test',
@@ -1890,7 +1875,7 @@ describe('Rokt Forwarder', () => {
18901875
]);
18911876
});
18921877

1893-
it('should parse a settings string with a number value', () => {
1878+
it('should parse a settings string with a stringified number value correctly', () => {
18941879
const settingsString =
18951880
'[{&quot;jsmap&quot;:&quot;-1484452948&quot;,&quot;map&quot;:&quot;-5208850776883573773&quot;,&quot;maptype&quot;:&quot;EventClass.Id&quot;,&quot;value&quot;:&quot;abc&quot;},{&quot;jsmap&quot;:&quot;1838502119&quot;,&quot;map&quot;:&quot;1324617889422969328&quot;,&quot;maptype&quot;:&quot;EventClass.Id&quot;,&quot;value&quot;:&quot;bcd&quot;},{&quot;jsmap&quot;:&quot;-355458063&quot;,&quot;map&quot;:&quot;5878452521714063084&quot;,&quot;maptype&quot;:&quot;EventClass.Id&quot;,&quot;value&quot;:&quot;card_viewed_test&quot;}]';
18961881

@@ -1926,7 +1911,7 @@ describe('Rokt Forwarder', () => {
19261911
.should.deepEqual([]);
19271912
});
19281913

1929-
it('throws an error message if the settings string is not a valid JSON', () => {
1914+
it('returns an empty array if the settings string is not a valid JSON', () => {
19301915
const settingsString = 'not a valid JSON';
19311916

19321917
window.mParticle.forwarder.testHelpers

0 commit comments

Comments
 (0)