Skip to content

Commit

Permalink
Merge pull request #35 from iagocavalcante/tests
Browse files Browse the repository at this point in the history
#32 Adding more tests in packages
  • Loading branch information
armand1m authored Oct 8, 2018
2 parents 9999820 + 003c7e4 commit 413ee0b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/packages/apply-console-proxy/apply-console-proxy.test.ts
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();
});
});
7 changes: 7 additions & 0 deletions src/packages/clear-store/clear-store.test.ts
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();
});
});
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)
})
})

0 comments on commit 413ee0b

Please sign in to comment.