-
Notifications
You must be signed in to change notification settings - Fork 46
adding support for jest by creating custom createSpyObject #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
You can find the jest version here: https://www.npmjs.com/package/ionic-mocks-jest |
| }; | ||
| return ActionSheetControllerMock; | ||
| }()); | ||
| exports.ActionSheetControllerMock = ActionSheetControllerMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var create_spy_1 = require("../utilities/create-spy"); | ||
| var action_sheet_1 = require("./action-sheet"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var create_spy_1 = require("../utilities/create-spy"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| var action_sheet_1 = require("./action-sheet"); | ||
| describe('ActionSheetMock', function () { | ||
| it('should initialize', function () { | ||
| expect(action_sheet_1.ActionSheetMock.instance).toBeDefined(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'expect' is not defined.
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var action_sheet_1 = require("./action-sheet"); | ||
| describe('ActionSheetMock', function () { | ||
| it('should initialize', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'it' is not defined.
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var action_sheet_1 = require("./action-sheet"); | ||
| describe('ActionSheetMock', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'describe' is not defined.
| @@ -0,0 +1,9 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var action_sheet_1 = require("./action-sheet"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,9 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| ActionSheetMock.instance = function () { | ||
| var instance = create_spy_1.createSpyObj('ActionSheet', ['present', 'dismiss']); | ||
| instance.present.and.returnValue(Promise.resolve()); | ||
| instance.dismiss.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| } | ||
| ActionSheetMock.instance = function () { | ||
| var instance = create_spy_1.createSpyObj('ActionSheet', ['present', 'dismiss']); | ||
| instance.present.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var create_spy_1 = require("../utilities/create-spy"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| }; | ||
| return AlertControllerMock; | ||
| }()); | ||
| exports.AlertControllerMock = AlertControllerMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var create_spy_1 = require("../utilities/create-spy"); | ||
| var alert_1 = require("./alert"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var create_spy_1 = require("../utilities/create-spy"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| }; | ||
| return ActionSheetMock; | ||
| }()); | ||
| exports.ActionSheetMock = ActionSheetMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| ActionSheetMock.instance = function () { | ||
| var instance = create_spy_1.createSpyObj('ActionSheet', ['present', 'dismiss']); | ||
| instance.present.and.returnValue(Promise.resolve()); | ||
| instance.dismiss.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| } | ||
| ActionSheetMock.instance = function () { | ||
| var instance = create_spy_1.createSpyObj('ActionSheet', ['present', 'dismiss']); | ||
| instance.present.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var create_spy_1 = require("../utilities/create-spy"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,16 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| } | ||
| return obj; | ||
| } | ||
| exports.createSpyObj = createSpyObj; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| function createSpyObj(baseName, methodNames) { | ||
| var obj = {}; | ||
| for (var i = 0; i < methodNames.length; i++) { | ||
| obj[methodNames[i]] = jasmine.createSpy(baseName, function () { }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'jasmine' is not defined.
| @@ -0,0 +1,11 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,11 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| describe('vibrate', function () { | ||
| it('should have been called', function () { | ||
| vibration.vibrate(); | ||
| expect(vibration.vibrate).toHaveBeenCalled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'expect' is not defined.
| @@ -0,0 +1,19 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var vibration_1 = require("./vibration"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,19 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,19 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| }; | ||
| return VibrationMock; | ||
| }()); | ||
| exports.VibrationMock = VibrationMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| function VibrationMock() { | ||
| } | ||
| VibrationMock.instance = function () { | ||
| var instance = jasmine.createSpyObj('Vibration', ['vibrate']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'jasmine' is not defined.
| @@ -0,0 +1,14 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,14 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| }; | ||
| return ThreeDeeTouchMock; | ||
| }()); | ||
| exports.ThreeDeeTouchMock = ThreeDeeTouchMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| 'enableLinkPreview', | ||
| 'disableLinkPreview' | ||
| ]); | ||
| instance.isAvailable.and.returnValue(Promise.resolve(true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var Observable_1 = require("rxjs/Observable"); | ||
| var create_spy_1 = require("../utilities/create-spy"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,25 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,25 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| }; | ||
| return SplashScreenMock; | ||
| }()); | ||
| exports.SplashScreenMock = SplashScreenMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,13 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var create_spy_1 = require("../utilities/create-spy"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,13 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,13 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| }; | ||
| return NFCMock; | ||
| }()); | ||
| exports.NFCMock = NFCMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var Observable_1 = require("rxjs/Observable"); | ||
| var create_spy_1 = require("../utilities/create-spy"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,48 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var Observable_1 = require("rxjs/Observable"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,48 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| }; | ||
| return KeyboardMock; | ||
| }()); | ||
| exports.KeyboardMock = KeyboardMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var Observable_1 = require("rxjs/Observable"); | ||
| var create_spy_1 = require("../utilities/create-spy"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,24 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var Observable_1 = require("rxjs/Observable"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,24 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,24 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| var nfc_1 = require("./nfc"); | ||
| exports.NFCMock = nfc_1.NFCMock; | ||
| var vibration_1 = require("./vibration"); | ||
| exports.VibrationMock = vibration_1.VibrationMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| exports.GoogleAnalyticsMock = google_analytics_1.GoogleAnalyticsMock; | ||
| var nfc_1 = require("./nfc"); | ||
| exports.NFCMock = nfc_1.NFCMock; | ||
| var vibration_1 = require("./vibration"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| var google_analytics_1 = require("./google-analytics"); | ||
| exports.GoogleAnalyticsMock = google_analytics_1.GoogleAnalyticsMock; | ||
| var nfc_1 = require("./nfc"); | ||
| exports.NFCMock = nfc_1.NFCMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| exports.NetworkMock = network_1.NetworkMock; | ||
| var google_analytics_1 = require("./google-analytics"); | ||
| exports.GoogleAnalyticsMock = google_analytics_1.GoogleAnalyticsMock; | ||
| var nfc_1 = require("./nfc"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| var network_1 = require("./network"); | ||
| exports.NetworkMock = network_1.NetworkMock; | ||
| var google_analytics_1 = require("./google-analytics"); | ||
| exports.GoogleAnalyticsMock = google_analytics_1.GoogleAnalyticsMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| exports.SplashScreenMock = splash_screen_1.SplashScreenMock; | ||
| var keyboard_1 = require("./keyboard"); | ||
| exports.KeyboardMock = keyboard_1.KeyboardMock; | ||
| var status_bar_1 = require("./status-bar"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| var splash_screen_1 = require("./splash-screen"); | ||
| exports.SplashScreenMock = splash_screen_1.SplashScreenMock; | ||
| var keyboard_1 = require("./keyboard"); | ||
| exports.KeyboardMock = keyboard_1.KeyboardMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var splash_screen_1 = require("./splash-screen"); | ||
| exports.SplashScreenMock = splash_screen_1.SplashScreenMock; | ||
| var keyboard_1 = require("./keyboard"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var splash_screen_1 = require("./splash-screen"); | ||
| exports.SplashScreenMock = splash_screen_1.SplashScreenMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,19 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var splash_screen_1 = require("./splash-screen"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,19 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| @@ -0,0 +1,19 @@ | |||
| "use strict"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the function form of "use strict".
| }; | ||
| return GoogleAnalyticsMock; | ||
| }()); | ||
| exports.GoogleAnalyticsMock = GoogleAnalyticsMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| instance.trackTiming.and.returnValue(Promise.resolve()); | ||
| instance.addTransaction.and.returnValue(Promise.resolve()); | ||
| instance.addTransactionItem.and.returnValue(Promise.resolve()); | ||
| instance.enableUncaughtExceptionReporting.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| instance.trackException.and.returnValue(Promise.resolve()); | ||
| instance.trackTiming.and.returnValue(Promise.resolve()); | ||
| instance.addTransaction.and.returnValue(Promise.resolve()); | ||
| instance.addTransactionItem.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| instance.setAppVersion.and.returnValue(Promise.resolve()); | ||
| instance.setOptOut.and.returnValue(Promise.resolve()); | ||
| instance.debugMode.and.returnValue(Promise.resolve()); | ||
| instance.trackMetric.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| instance.setAnonymizeIp.and.returnValue(Promise.resolve()); | ||
| instance.setAppVersion.and.returnValue(Promise.resolve()); | ||
| instance.setOptOut.and.returnValue(Promise.resolve()); | ||
| instance.debugMode.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| instance.setUserId.and.returnValue(Promise.resolve()); | ||
| instance.setAnonymizeIp.and.returnValue(Promise.resolve()); | ||
| instance.setAppVersion.and.returnValue(Promise.resolve()); | ||
| instance.setOptOut.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| instance.setAllowIDFACollection.and.returnValue(Promise.resolve()); | ||
| instance.setUserId.and.returnValue(Promise.resolve()); | ||
| instance.setAnonymizeIp.and.returnValue(Promise.resolve()); | ||
| instance.setAppVersion.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| instance.startTrackerWithId.and.returnValue(Promise.resolve()); | ||
| instance.setAllowIDFACollection.and.returnValue(Promise.resolve()); | ||
| instance.setUserId.and.returnValue(Promise.resolve()); | ||
| instance.setAnonymizeIp.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| ]); | ||
| instance.startTrackerWithId.and.returnValue(Promise.resolve()); | ||
| instance.setAllowIDFACollection.and.returnValue(Promise.resolve()); | ||
| instance.setUserId.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| 'enableUncaughtExceptionReporting' | ||
| ]); | ||
| instance.startTrackerWithId.and.returnValue(Promise.resolve()); | ||
| instance.setAllowIDFACollection.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| 'addTransactionItem', | ||
| 'enableUncaughtExceptionReporting' | ||
| ]); | ||
| instance.startTrackerWithId.and.returnValue(Promise.resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Promise' is not defined.
| @@ -0,0 +1,47 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
| var create_spy_1 = require("../utilities/create-spy"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'require' is not defined.
| @@ -0,0 +1,47 @@ | |||
| "use strict"; | |||
| Object.defineProperty(exports, "__esModule", { value: true }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'exports' is not defined.
| it('should return spyable Promise that resolves to default key', function (done) { | ||
| classUnderTest.keys() | ||
| .then(function (res) { | ||
| expect(classUnderTest.keys).toHaveBeenCalled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'expect' is not defined.
| }); | ||
| }); | ||
| describe('keys', function () { | ||
| it('should return spyable Promise that resolves to default key', function (done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'it' is not defined.
| }); | ||
| }); | ||
| }); | ||
| describe('keys', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'describe' is not defined.
| classUnderTest.length() | ||
| .then(function (res) { | ||
| expect(classUnderTest.length).toHaveBeenCalled(); | ||
| expect(res).toEqual(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'expect' is not defined.
| it('should return spyable Promise that resolves to 1', function (done) { | ||
| classUnderTest.length() | ||
| .then(function (res) { | ||
| expect(classUnderTest.length).toHaveBeenCalled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'expect' is not defined.
I am taking over the work for the following pull request. This PR is same as #31. @stonelasley Did you get a chance to test it out?
Thanks