Skip to content

Commit 736f5fe

Browse files
author
Evan Purcer
committed
adding a test for current_url
1 parent c3fb4d1 commit 736f5fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,14 @@ mpmodule("mixpanel");
895895
equal(mixpanel.test.persistence.props[i_ref_d], "examixpanel.testle.com", "Just domain should be saved");
896896
});
897897

898+
test("current url set correctly", 2, function() {
899+
var current_url = "$current_url";
900+
var event = mixpanel.test.track("check current url");
901+
var props = event.properties;
902+
ok(current_url in props, "current url in props");
903+
equal(props[current_url], window.location.href, "current url is properly set");
904+
});
905+
898906
test("set_config", 2, function() {
899907
ok(!mixpanel.config.test, "test isn't set already");
900908
mixpanel.set_config({ test: 1 });

0 commit comments

Comments
 (0)