Skip to content

Commit

Permalink
test file for path matching
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthropohedron committed Apr 5, 2015
1 parent d2e62b8 commit 2a138c7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/test-matcher-path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var Matcher = require("./matcher").Matcher;
var mock = require("./mock-channel.js");

exports["test exact path match"] = function(assert) {
var matcher = new Matcher([ "www.example.com/foo/bar$" ]);
var channel = mock.createMockChannel("www.example.com", "/foo/bar");
assert.strictEqual(matcher.testRequest(channel), true,
"Exact path match request");
assert.strictEqual(matcher.testResponse(channel), true,
"Exact path match response");
}

require("sdk/test").run(exports);

0 comments on commit 2a138c7

Please sign in to comment.