UNPKG

@shko.online/componentframework-mock

Version:

Mocking library to help with testing PowerApps Component Framework Components

23 lines (22 loc) 614 B
/* Copyright (c) 2022 Betim Beja and Shko Online LLC Licensed under the MIT license. */ import { stub } from 'sinon'; export class ClientMock { constructor() { this.disableScroll = false; this.getClient = void 0; this.getFormFactor = void 0; this.isNetworkAvailable = void 0; this.isOffline = void 0; this.getClient = stub(); this.getClient.returns('Web'); this.getFormFactor = stub(); this.getFormFactor.returns(1); this.isNetworkAvailable = stub(); this.isNetworkAvailable.returns(true); this.isOffline = stub(); this.isOffline.returns(false); } }