message: Fixes 'spo site set' code coverage. Closes
diff: @@ -1391,6 +1391,37 @@ describe(commands.SITE_SET, () => {
  });
  });
  + it('correctly handles Generic API error', (done) => {
  + sinon.stub(request, 'get').callsFake((opts) => {
  + if (opts.url === 'https://contoso.sharepoint.com/sites/Sales/_api/site?$select=GroupId,Id') {
  + return Promise.resolve({
  + Id: '255a50b2-527f-4413-8485-57f4c17a24d1',
  + GroupId: '00000000-0000-0000-0000-000000000000'
  + });
  + }
  +
  + return Promise.reject('Invalid request');
  + });
  + sinon.stub(command as any, 'getSpoAdminUrl').callsFake(() => Promise.resolve('https://contoso-admin.sharepoint.com'));
  + sinon.stub(request, 'post').callsFake((opts) => {
  + if ((opts.url as string).indexOf(`/_vti_bin/client.svc/ProcessQuery`) > -1) {
  + return Promise.reject('An error has occurred');
  + }
  +
  + return Promise.reject('Invalid request');
  + });
  +
  + command.action(logger, { options: { debug: false, url: 'https://contoso.sharepoint.com/sites/Sales', sharingCapability: 'Disabled' } } as any, (err?: any) => {
  + try {
  + assert.strictEqual(JSON.stringify(err), JSON.stringify(new CommandError('An error has occurred')));
  + done();
  + }
  + catch (e) {
  + done(e);
  + }
  + });
  + });
  +
  it('configures command types', () => {
  assert.notStrictEqual(typeof command.types(), 'undefined', 'command types undefined');
  assert.notStrictEqual((command.types() as CommandTypes).string, 'undefined', 'command string types undefined');
  