UNPKG

@shko.online/componentframework-mock

Version:

Mocking library to help with testing PowerApps Component Framework Components

30 lines (28 loc) 798 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ClientMock = void 0; var _sinon = require("sinon"); /* Copyright (c) 2022 Betim Beja and Shko Online LLC Licensed under the MIT license. */ class ClientMock { constructor() { this.disableScroll = false; this.getClient = void 0; this.getFormFactor = void 0; this.isNetworkAvailable = void 0; this.isOffline = void 0; this.getClient = (0, _sinon.stub)(); this.getClient.returns('Web'); this.getFormFactor = (0, _sinon.stub)(); this.getFormFactor.returns(1); this.isNetworkAvailable = (0, _sinon.stub)(); this.isNetworkAvailable.returns(true); this.isOffline = (0, _sinon.stub)(); this.isOffline.returns(false); } } exports.ClientMock = ClientMock;