-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: bundle does not export everything that index has
- Loading branch information
1 parent
1a5fdf9
commit 488cd49
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/** Index file for webpack and cdn usage */ | ||
|
||
export * from './index'; | ||
export * from './cache/create'; | ||
export * from './storage/browser'; | ||
export * from './storage/memory'; | ||
export * from './storage/storage'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { useCache } from '../src/cache/create'; | ||
import { BrowserAxiosStorage } from '../src/storage/browser'; | ||
import { MemoryAxiosStorage } from '../src/storage/memory'; | ||
import { AxiosStorage } from '../src/storage/storage'; | ||
|
||
describe('test bundle imports', () => { | ||
it('should have basic storages', async () => { | ||
const bundle = await import('../src/index.bundle'); | ||
|
||
expect(bundle.useCache).toBe(useCache); | ||
expect(bundle.AxiosStorage).toBe(AxiosStorage); | ||
expect(bundle.BrowserAxiosStorage).toBe(BrowserAxiosStorage); | ||
expect(bundle.MemoryAxiosStorage).toBe(MemoryAxiosStorage); | ||
}); | ||
}); |