-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from iagocavalcante/tests
#32 Adding more tests in packages
- Loading branch information
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/packages/apply-console-proxy/apply-console-proxy.test.ts
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,20 @@ | ||
import applyConsoleProxy from './'; | ||
|
||
const options = { | ||
log: true, | ||
warn: true, | ||
error: true, | ||
clicks: true, | ||
cookies: true, | ||
localStorage: true, | ||
sessionStorage: true, | ||
clearOnReload: true, | ||
ignoreScriptErrors: true, | ||
plugins: [] | ||
} | ||
|
||
describe('Apply Console Proxy', () => { | ||
it('should return undefined', () => { | ||
expect(applyConsoleProxy(options)).toBeUndefined(); | ||
}); | ||
}); |
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,7 @@ | ||
import clearStore from './'; | ||
|
||
describe('Clear Store', () => { | ||
it('should clear localStorage', () => { | ||
expect(clearStore).toBeUndefined(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
src/packages/default-feature-toggle-store/default-feature-toogle-store.test.ts
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 defaultFeatureToggleStore from './'; | ||
|
||
describe('Default Feature Toogle Store', () => { | ||
it('should Features.CONSOLE_LISTENER return false', () => { | ||
expect(defaultFeatureToggleStore['perry::feature::consolelistener']).toBe(false) | ||
}) | ||
|
||
it('should Features.DOCUMENT_CLICK_LISTENER return false', () => { | ||
expect(defaultFeatureToggleStore['perry::feature::documentclicklistener']).toBe(false) | ||
}) | ||
|
||
it('should Features.WINDOW_ERROR_LISTENER return false', () => { | ||
expect(defaultFeatureToggleStore['perry::feature::windowerrorlistener']).toBe(false) | ||
}) | ||
}) |