Skip to content

adding support for jest by creating custom createSpyObject#47

Open
tgadre wants to merge 5 commits intostonelasley:developfrom
bullhorn:f/createSpyObj
Open

adding support for jest by creating custom createSpyObject#47
tgadre wants to merge 5 commits intostonelasley:developfrom
bullhorn:f/createSpyObj

Conversation

@tgadre
Copy link
Copy Markdown

@tgadre tgadre commented Feb 5, 2018

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

@danielsogl
Copy link
Copy Markdown

You can find the jest version here: https://www.npmjs.com/package/ionic-mocks-jest

};
return ActionSheetControllerMock;
}());
exports.ActionSheetControllerMock = ActionSheetControllerMock;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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();
Copy link
Copy Markdown

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 () {
Copy link
Copy Markdown

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 () {
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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 () { });
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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();
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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']);
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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));
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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";
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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());
Copy link
Copy Markdown

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");
Copy link
Copy Markdown

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 });
Copy link
Copy Markdown

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();
Copy link
Copy Markdown

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) {
Copy link
Copy Markdown

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 () {
Copy link
Copy Markdown

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);
Copy link
Copy Markdown

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();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'expect' is not defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants