Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
test: it should have ability to ignore some files
Browse files Browse the repository at this point in the history
  • Loading branch information
thecotne committed Mar 15, 2018
1 parent 63810bd commit f89859c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions spec/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,19 @@ describe('entry', () => {
expect(() => entry(1)).toThrow()
})

it('must thorw if first argument is not string or function', () => {
it('should have ability to ignore some files', () => {
mockFs({
'src/main.entry.js': '',
'src/vendor.entry.js': '',
'src/foo/bar.js': ''
'src/foo/foo-script.js': '',
'src/bar/bar-script.js': '',
'src/baz/baz-script.js': ''
})

expect(() => entry(1)).toThrow()
var expectedResult = {
'foo-script': 'src/foo/foo-script.js',
'baz-script': 'src/baz/baz-script.js'
}

expect(entry('src/!(bar)/*.js')).toEqual(expectedResult)
})
})

Expand Down

0 comments on commit f89859c

Please sign in to comment.