diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-11-04 23:55:09 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-11-11 20:24:41 +0900 |
commit | 4e94695c758215a950fe53911e1c1e30e47b9c98 (patch) | |
tree | 67f747bb6f55478f438f748ba0c91e5a6341c385 /test/shared/util/re.test.js | |
parent | 0630c8f56664ac48f4cf8799dc1d88a6388957a6 (diff) |
add key utils
Diffstat (limited to 'test/shared/util/re.test.js')
-rw-r--r-- | test/shared/util/re.test.js | 20 |
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); - }) -}); |