Skip to content

Commit

Permalink
chaos: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiazya committed Dec 11, 2023
1 parent 5033bed commit 2f253cd
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { getGlobBase } from './get-glob-base.js'

describe('getGlobBase', () => {
test.each([
{ pattrn: 'foo/bar/*.js', expected: 'foo/bar/' },
{ pattrn: 'foo/bar/**/*.js', expected: 'foo/bar/' },
{ pattrn: 'foo/bar/**/baz/*.js', expected: 'foo/bar/' },
{ pattrn: 'foo/bar/**/baz/**/*.js', expected: 'foo/bar/' },
{ pattrn: 'foo/bar/foo*.js', expected: 'foo/bar/' },
{ pattrn: 'foo/bar/foo[0-9].js', expected: 'foo/bar/' },
])('should return the base directory "$expected" for the given glob pattern "$pattrn"', ({ pattrn, expected }) => {
expect(getGlobBase(pattrn)).toBe(expected)
{ pattern: 'foo/bar/*.js', expected: 'foo/bar/' },
{ pattern: 'foo/bar/**/*.js', expected: 'foo/bar/' },
{ pattern: 'foo/bar/**/baz/*.js', expected: 'foo/bar/' },
{ pattern: 'foo/bar/**/baz/**/*.js', expected: 'foo/bar/' },
{ pattern: 'foo/bar/foo*.js', expected: 'foo/bar/' },
{ pattern: 'foo/bar/foo[0-9].js', expected: 'foo/bar/' },
])('should return the base directory "$expected" for the given glob pattern "$pattern"', ({ pattern, expected }) => {
expect(getGlobBase(pattern)).toBe(expected)
})
})

0 comments on commit 2f253cd

Please sign in to comment.