aboutsummaryrefslogtreecommitdiff
path: root/test/shared/util/re.test.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-11-12 18:25:14 +0900
committerGitHub <noreply@github.com>2017-11-12 18:25:14 +0900
commitc7b05482f33cc778e1966faa9354ea46b490a115 (patch)
treeb73bc6e5a6468d8c5a1118dcfb61f9d00b1aa5cf /test/shared/util/re.test.js
parent3af2e3154ed6b56400d02fc3d726bfc7186f372a (diff)
parentccf3c7b421e804172827dd34a995290afc85af10 (diff)
Merge pull request #132 from ueokande/meta-keys
Meta keys
Diffstat (limited to 'test/shared/util/re.test.js')
-rw-r--r--test/shared/util/re.test.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/shared/util/re.test.js b/test/shared/util/re.test.js
deleted file mode 100644
index 9ed6521..0000000
--- a/test/shared/util/re.test.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import { expect } from 'chai';
-import * as re from 'shared/utils/re';
-
-describe("re util", () => {
- it('matches by pattern', () => {
- let regex = re.fromWildcard('*.example.com/*');
- expect('foo.example.com/bar').to.match(regex);
- expect('foo.example.com').not.to.match(regex);
- expect('example.com/bar').not.to.match(regex);
-
- regex = re.fromWildcard('example.com/*')
- expect('example.com/foo').to.match(regex);
- expect('example.com/').to.match(regex);
-
- regex = re.fromWildcard('example.com/*bar')
- expect('example.com/foobar').to.match(regex);
- expect('example.com/bar').to.match(regex);
- expect('example.com/foobarfoo').not.to.match(regex);
- })
-});