Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Update invocation.support.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hamitb committed Jul 2, 2019
1 parent fca9e88 commit 67f5046
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/plugins/invocation.support.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ describe('Invocation Support', () => {
InvocationSupport.setTag('number', 5);
InvocationSupport.setTag('string', 'value');
InvocationSupport.setTag('boolean', true);

InvocationSupport.setAgentTag('number', 7);
InvocationSupport.setAgentTag('string', 'foo');
InvocationSupport.setAgentTag('boolean', false);
const object = {
name: 'ibrahim',
age: 15,
Expand All @@ -21,6 +25,9 @@ describe('Invocation Support', () => {
expect(InvocationSupport.userTags['number']).toBe(5);
expect(InvocationSupport.userTags['string']).toBe('value');
expect(InvocationSupport.userTags['boolean']).toBe(true);
expect(InvocationSupport.tags['number']).toBe(7);
expect(InvocationSupport.tags['string']).toBe('foo');
expect(InvocationSupport.tags['boolean']).toBe(false);
expect(InvocationSupport.userTags ['object']).toBe(object);
});
});
Expand All @@ -31,6 +38,11 @@ describe('Invocation Support', () => {
InvocationSupport.setTag('string', 'value');
InvocationSupport.setTag('boolean', true);
InvocationSupport.setTag('number', 5);

InvocationSupport.setAgentTag('string', 'foo');
InvocationSupport.setAgentTag('boolean', false);
InvocationSupport.setAgentTag('number', 7);

const object = {
name: 'ibrahim',
age: 15,
Expand All @@ -41,6 +53,10 @@ describe('Invocation Support', () => {
expect(InvocationSupport.getTag('string')).toBe('value');
expect(InvocationSupport.getTag('boolean')).toBe(true);
expect(InvocationSupport.getTag('object')).toBe(object);

expect(InvocationSupport.getAgentTag('number')).toBe(7);
expect(InvocationSupport.getAgentTag('string')).toBe('foo');
expect(InvocationSupport.getAgentTag('boolean')).toBe(false);
});
});

Expand All @@ -49,7 +65,13 @@ describe('Invocation Support', () => {
InvocationSupport.setTag('number', 5);
InvocationSupport.setTag('string', 'value');

InvocationSupport.setAgentTag('number', 7);
InvocationSupport.setAgentTag('string', 'foo');

InvocationSupport.removeTags();
InvocationSupport.removeAgentTags();

expect(InvocationSupport.tags).toEqual({});
expect(InvocationSupport.userTags).toEqual({});
});
});
Expand Down

0 comments on commit 67f5046

Please sign in to comment.