@shko.online/componentframework-mock
Version:
Mocking library to help with testing PowerApps Component Framework Components
39 lines (37 loc) • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NavigationMock = void 0;
var _sinon = require("sinon");
/*
Copyright (c) 2022 Betim Beja and Shko Online LLC
Licensed under the MIT license.
*/
class NavigationMock {
constructor() {
this.openAlertDialog = void 0;
this.openConfirmDialog = void 0;
this.openErrorDialog = void 0;
this.openFile = void 0;
this.openForm = void 0;
this.openUrl = void 0;
this.openWebResource = void 0;
this.openAlertDialog = (0, _sinon.stub)();
this.openAlertDialog.callsFake((alertStrings, options) => {
return Promise.resolve();
});
this.openConfirmDialog = (0, _sinon.stub)();
this.openConfirmDialog.callsFake((confirmStrings, options) => {
return Promise.resolve({
confirmed: true
});
});
this.openErrorDialog = (0, _sinon.stub)();
this.openFile = (0, _sinon.stub)();
this.openForm = (0, _sinon.stub)();
this.openUrl = (0, _sinon.stub)();
this.openWebResource = (0, _sinon.stub)();
}
}
exports.NavigationMock = NavigationMock;