I am very new to webpack. I need to use webpack because I would like to use a custom library with my Jasmine testspecs and need to run babel so I can use import
and export
In the past, I used testem to run my specs in the browser. I am trying to replicate the same behavior, but now that I have a module I need to import, I need a bundler.
I have multiple test specs files in different directories. My initial thought was to export each file and import the file in the webpack entry point.
Unfortunately, I can't export the files, since I can't assign the specs to a variable to export (unless I wrap everything in an IIFE possibly...).
At this point, I am lost on what to do, my only idea is to use the multiple file entry option and pull in all of my test spec files individually. These feels unnecessary.
Here is an example of a test spec file:
import myModule from 'myModule'
describe('tests', function() {
it('some test', function(){
expect(myModule(someFunc)).toBe('true')
}
}
I tried looking at other configurations but can't examples that have multiple files, only examples with a single file such as this example