@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
104 lines (102 loc) • 3.39 kB
JavaScript
export class MsftSmeMock {
static strings;
static selfSpy;
static getStringsSpy;
static mockStrings(strings) {
MsftSmeMock.strings = strings.Strings;
MsftSmeMock.getStringsSpy = spyOn(MsftSme, 'getStrings').and.callFake(() => MsftSmeMock.strings);
}
static mockSelf(overrides) {
const mock = {
Init: {
mode: 1,
isProduction: false,
logLevel: 7,
sessionExpiration: 0,
performanceProfile: false,
developerGuide: false,
connectivityLevel: '',
isShell: false,
shellVersion: '15.2.9',
gatewayApiVersion: '2.0.0',
gatewayPlatform: 'Windows'
},
Host: {
isElectron: false,
isWeb: true
},
Environment: {
name: null,
displayName: null,
resources: null,
origin: null,
signature: null,
shell: null,
entryPoints: null,
modules: null,
version: null,
configuration: {
settings: {
account: {
show: true
},
personalization: {
show: true
},
diagnostic: {
show: true
},
language: {
show: true
},
notification: {
show: true
},
extension: {
show: true
},
azure: {
show: true
},
access: {
show: true
},
sharedConnections: {
show: true
},
general: {
show: true
},
connectivity: {
show: true
},
updates: {
show: true
},
performance: {
show: true
},
advanced: {
show: true
}
}
},
gatewayApiVersion: null,
gatewayPlatform: null
},
Resources: {
localeId: 'en-US',
localeRegionalId: 'en-US',
strings: MsftSmeMock.strings,
theme: 'light',
assets: { css: [], cssV2: [], js: [] },
moduleAssets: {},
accessibilityMode: false,
lib: null
}
};
MsftSme.deepAssign(mock, overrides || {});
MsftSmeMock.selfSpy = spyOn(MsftSme, 'self').and.callFake(() => mock);
}
}
//# sourceMappingURL=msft-sme.mock.js.map