Skip to content

Commit ec2b6a7

Browse files
authored
test: add a glob test (#6911)
1 parent ff3ad7a commit ec2b6a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/page/interception.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ it('should work with glob', async () => {
7777
expect(globToRegex('**/*.{png,jpg,jpeg}').test('https://localhost:8080/c.jpeg')).toBeTruthy();
7878
expect(globToRegex('**/*.{png,jpg,jpeg}').test('https://localhost:8080/c.png')).toBeTruthy();
7979
expect(globToRegex('**/*.{png,jpg,jpeg}').test('https://localhost:8080/c.css')).toBeFalsy();
80+
expect(globToRegex('foo*').test('foo.js')).toBeTruthy();
81+
expect(globToRegex('foo*').test('foo/bar.js')).toBeFalsy();
82+
expect(globToRegex('http://localhost:3000/signin-oidc*').test('http://localhost:3000/signin-oidc/foo')).toBeFalsy();
83+
expect(globToRegex('http://localhost:3000/signin-oidc*').test('http://localhost:3000/signin-oidcnice')).toBeTruthy();
8084
});
8185

8286
it('should intercept network activity from worker', async function({page, server, isAndroid}) {

0 commit comments

Comments
 (0)