ionic-mocks
Advanced tools
Comparing version 0.6.2 to 0.6.3
{ | ||
"name": "ionic-mocks", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "Stubbed and Pre-mocked Ionic2 Objects", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:stonelasley/ionic-mocks.git", |
@@ -24,3 +24,8 @@ export class PlatformMock { | ||
'version', | ||
'width' | ||
'width', | ||
'doc', | ||
'registerListener', | ||
'win', | ||
'getActiveElement', | ||
'raf' | ||
]); | ||
@@ -41,2 +46,6 @@ | ||
instance.width.and.returnValue(0); | ||
instance.doc.and.returnValue(document); | ||
instance.win.and.returnValue(window); | ||
instance.getActiveElement.and.returnValue(document['activeElement']); | ||
instance.raf.and.returnValue(1); | ||
@@ -43,0 +52,0 @@ return instance; |
@@ -1,2 +0,4 @@ | ||
import { Observable } from 'rxjs'; | ||
import { Observable } from 'rxjs'; | ||
import { NavParamsMock } from './nav-params'; | ||
import { NavControllerMock } from './nav-controller'; | ||
@@ -23,2 +25,8 @@ export class ViewControllerMock { | ||
'hasNavbar', | ||
'index', | ||
'subscribe', | ||
'getNav', | ||
'getIONContent', | ||
'writeReady', | ||
'readReady', | ||
'setBackButtonText', | ||
@@ -28,3 +36,8 @@ 'showBackButton', | ||
'_setNavbar', | ||
'_setNav', | ||
'_setInstance', | ||
'_setIONContent', | ||
'_setContent', | ||
'_setContentRef', | ||
'_setFooter', | ||
'_setIONContentRef' | ||
@@ -40,2 +53,4 @@ ]); | ||
instance.dismiss.and.returnValue(Promise.resolve()); | ||
instance.onDidDismiss.and.returnValue(Promise.resolve()); | ||
instance.onWillDismiss.and.returnValue(Promise.resolve()); | ||
instance.enableBack.and.returnValue(true); | ||
@@ -46,6 +61,30 @@ instance.isFirst.and.returnValue(false); | ||
instance.getContent.and.returnValue({}); | ||
instance.contentRef.and.returnValue(Promise.resolve()); | ||
instance.hasNavbar.and.returnValue(true); | ||
instance.index.and.returnValue(true); | ||
instance.subscribe.and.returnValue(Observable.of({})); | ||
instance.getNav.and.returnValue(NavControllerMock.instance()); | ||
instance.getIONContent.and.returnValue({}); | ||
instance.writeReady.and.returnValue({ | ||
emit(): void { | ||
}, | ||
subscribe(): any { | ||
} | ||
}); | ||
instance.readReady.and.returnValue({ | ||
emit(): void { | ||
}, | ||
subscribe(): any { | ||
} | ||
}); | ||
instance['component'] = {}; | ||
instance['index'] = 0; | ||
instance['data'] = NavParamsMock.instance(); | ||
instance['instance'] = {}; | ||
instance['id'] = ''; | ||
@@ -52,0 +91,0 @@ return instance; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21988
504