Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ionic-mocks

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ionic-mocks - npm Package Compare versions

Comparing version 0.13.0 to 1.0.0

dist/native/google-analytics.d.ts

3

dist/angular/index.d.ts

@@ -19,3 +19,2 @@ import { ActionSheetMock } from './action-sheet';

import { NavControllerMock } from './nav-controller';
import { NavMock } from './nav';
import { NavParamsMock } from './nav-params';

@@ -32,2 +31,2 @@ import { TabMock } from './tab';

import { ViewControllerMock } from './view-controller';
export { ActionSheetMock, ActionSheetControllerMock, AlertMock, AlertControllerMock, AppMock, ConfigMock, ContentMock, EventsMock, FormMock, HapticMock, ItemSlidingMock, LoadingMock, LoadingControllerMock, MenuMock, MenuControllerMock, ModalMock, ModalControllerMock, NavControllerMock, NavMock, NavParamsMock, TabMock, TabsMock, InfiniteScrollMock, PlatformMock, PopoverMock, PopoverControllerMock, ToastMock, ToastControllerMock, SlidesMock, ViewControllerMock };
export { ActionSheetMock, ActionSheetControllerMock, AlertMock, AlertControllerMock, AppMock, ConfigMock, ContentMock, EventsMock, FormMock, HapticMock, ItemSlidingMock, LoadingMock, LoadingControllerMock, MenuMock, MenuControllerMock, ModalMock, ModalControllerMock, NavControllerMock, NavParamsMock, TabMock, TabsMock, InfiniteScrollMock, PlatformMock, PopoverMock, PopoverControllerMock, ToastMock, ToastControllerMock, SlidesMock, ViewControllerMock };

@@ -39,4 +39,2 @@ "use strict";

exports.NavControllerMock = nav_controller_1.NavControllerMock;
var nav_1 = require("./nav");
exports.NavMock = nav_1.NavMock;
var nav_params_1 = require("./nav-params");

@@ -43,0 +41,0 @@ exports.NavParamsMock = nav_params_1.NavParamsMock;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var view_controller_1 = require("./view-controller");
var NavControllerMock = (function () {

@@ -7,17 +8,72 @@ function NavControllerMock() {

NavControllerMock.instance = function () {
var instance = jasmine.createSpyObj('navController', [
var instance = jasmine.createSpyObj('NavController', [
'goToRoot',
'initPane',
'pangeChanged',
'push',
'insert',
'insertPage',
'pop',
'ionViewDidLoad',
'ionViewWillEnter',
'ionViewDidEnter',
'ionViewWillLeave',
'ionViewWillUnload',
'ionViewCanEnter',
'ionViewCanLeave'
'popTo',
'popToRoot',
'popAll',
'remove',
'removeView',
'setRoot',
'setPages',
'hasChildren',
'getActiveChildNav',
'registerChildNav',
'unregisterChildNav',
'destroy',
'swipeBackStart',
'swipeBackProgress',
'swipeBackEnd',
'canSwipeBack',
'canGoBack',
'isTransitioning',
'setTransitioning',
'getActive',
'isActive',
'getByIndex',
'getPrevious',
'first',
'last',
'indexOf',
'length',
'getViews',
'isSwipeBackEnabled',
'dismissPageChangeViews',
'setViewPort',
'resize'
]);
instance.goToRoot.and.returnValue(Promise.resolve());
instance.initPane.and.returnValue(1);
instance['root'] = view_controller_1.ViewControllerMock.instance();
instance['rootParams'] = {};
instance.push.and.returnValue(Promise.resolve());
instance.insert.and.returnValue(Promise.resolve());
instance.insertPage.and.returnValue(Promise.resolve());
instance.pop.and.returnValue(Promise.resolve());
instance.ionViewCanEnter.and.returnValue(true);
instance.ionViewCanLeave.and.returnValue(true);
instance.popTo.and.returnValue(Promise.resolve());
instance.popToRoot.and.returnValue(Promise.resolve());
instance.popAll.and.returnValue(Promise.resolve());
instance.remove.and.returnValue(Promise.resolve());
instance.removeView.and.returnValue(Promise.resolve());
instance.setRoot.and.returnValue(Promise.resolve());
instance.setPages.and.returnValue(Promise.resolve());
instance.hasChildren.and.returnValue(true);
instance.canSwipeBack.and.returnValue(true);
instance.canGoBack.and.returnValue(true);
instance.isTransitioning.and.returnValue(false);
instance.getActive.and.returnValue(view_controller_1.ViewControllerMock.instance());
instance.isActive.and.returnValue(true);
instance.getByIndex.and.returnValue(view_controller_1.ViewControllerMock.instance());
instance.getPrevious.and.returnValue(view_controller_1.ViewControllerMock.instance());
instance.first.and.returnValue(view_controller_1.ViewControllerMock.instance());
instance.last.and.returnValue(view_controller_1.ViewControllerMock.instance());
instance.indexOf.and.returnValue(0);
instance.length.and.returnValue(0);
instance.getViews.and.returnValue([]);
instance.isSwipeBackEnabled.and.returnValue(true);
return instance;

@@ -24,0 +80,0 @@ };

@@ -6,2 +6,3 @@ import { SplashScreenMock } from './splash-screen';

import { NetworkMock } from './network';
export { KeyboardMock, SplashScreenMock, StatusBarMock, ThreeDeeTouchMock, NetworkMock };
import { GoogleAnalyticsMock } from './google-analytics';
export { KeyboardMock, SplashScreenMock, StatusBarMock, ThreeDeeTouchMock, NetworkMock, GoogleAnalyticsMock };

@@ -13,2 +13,4 @@ "use strict";

exports.NetworkMock = network_1.NetworkMock;
var google_analytics_1 = require("./google-analytics");
exports.GoogleAnalyticsMock = google_analytics_1.GoogleAnalyticsMock;
//# sourceMappingURL=index.js.map
{
"name": "ionic-mocks",
"version": "0.13.0",
"version": "1.0.0",
"description": "Stubbed and Pre-mocked Ionic2 Objects",

@@ -5,0 +5,0 @@ "repository": "git@github.com:stonelasley/ionic-mocks.git",

@@ -33,3 +33,2 @@ [![Build Status](https://travis-ci.org/stonelasley/ionic-mocks.svg?branch=master)](https://travis-ci.org/stonelasley/ionic-mocks)

- NavController
- Nav
- NavParams

@@ -46,6 +45,7 @@ - StatusBar

- 3DTouch
- GoogleAnalyics
- Keyboard
- Network
- Splashscreen
- Network
- StatusBar

@@ -136,1 +136,26 @@ ## Installation

```
### Frequently Asked Questions:
#### Q: I am receiving a `TypeError: jit__object_Object_33 is not a function` error. What does that mean?
Answer: This means you've done something wrong. Take a look at this example:
```ts
// DO NOT DO THIS
// USING useClass INSTEAD OF useFactory IS INCORRECT
{ provide: App, useClass: AppMock }
```
```ts
// DO NOT DO THIS
// USING useFactory WITHOUT THE FAT ARROW SYNTAX IS INCORRECT
{ provide: App, useFactory: AppMock.instance() }
```
Make sure you are using the `useFactory` property name and using the fat arrow function as the value:
```ts
// DO THIS
{ provide: App, useClass: () => AppMock.instance() }
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc