Skip to content

Commit

Permalink
adds gitignore and failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Jan 3, 2014
1 parent 624b9e3 commit 8ceaa1c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules/
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "paramify",
"version": "0.1.1",
"version": "0.1.2",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
10 changes: 10 additions & 0 deletions test/paramify.js
Expand Up @@ -39,4 +39,14 @@ test('regex matches', function (t) {

match = paramify('/file')
t.assert(!match(/^\/files(\/.*)?/))
})

test('regex fail to match', function (t) {
t.plan(2)

var match = paramify('/profile')
t.assert(!match(/^\/xprofile/))

match = paramify('/@username')
t.assert(!match(/^\/(xprofile|@#(.*?))/))
})

0 comments on commit 8ceaa1c

Please sign in to comment.