-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f264482
commit 6a853c8
Showing
4 changed files
with
121 additions
and
1,856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,34 +11,29 @@ describe('Trench Analytics', () => { | |
|
||
it('should initialize analytics', () => { | ||
const trench = new Trench(getConfig()); | ||
trench.initialize(); | ||
expect(trench.loaded()).toBe(true); | ||
}); | ||
|
||
it('should track an event', async () => { | ||
const trench = new Trench(getConfig()); | ||
trench.initialize(); | ||
await trench.track('test_event', { key: 'value' }); | ||
// Assuming there's a way to verify the event was tracked | ||
}); | ||
|
||
it('should track a page view', async () => { | ||
const trench = new Trench(getConfig()); | ||
trench.initialize(); | ||
await trench.page({ title: 'Test Page' }); | ||
// Assuming there's a way to verify the page view was tracked | ||
}); | ||
|
||
it('should identify a user', async () => { | ||
const trench = new Trench(getConfig()); | ||
trench.initialize(); | ||
await trench.identify('user123', { email: '[email protected]' }); | ||
// Assuming there's a way to verify the user was identified | ||
}); | ||
|
||
it('should group a user', async () => { | ||
const trench = new Trench(getConfig()); | ||
trench.initialize(); | ||
await trench.group('group123', { groupName: 'Test Group' }); | ||
// Assuming there's a way to verify the group was tracked | ||
}); | ||
|
Oops, something went wrong.