Repository: electron/electron
File: spec/api-app-spec.ts (TypeScript)

Code before:
        restoreState: false,
        executableWillLaunchAtLogin: true,
        launchItems: [{
          name: 'additionalEntry',
          path: process.execPath,
          args: ['arg1'],
          scope: 'user',
          enabled: true
        }]
      };

      app.setLoginItemSettings({ openAtLogin: true, name: 'additionalEntry', enabled: false, args: ['arg1'] });
      let appProcess = cp.spawn('reg', [...regAddArgs, '020000000000000000000000']);
      await once(appProcess, 'exit');
      expect(app.getLoginItemSettings()).to.deep.equal(expectation);

      app.setLoginItemSettings({ openAtLogin: true, name: 'additionalEntry', enabled: false, args: ['arg1'] });
      appProcess = cp.spawn('reg', [...regAddArgs, '000000000000000000000000']);
      await once(appProcess, 'exit');
      expect(app.getLoginItemSettings()).to.deep.equal(expectation);
    });
  });

  describe('accessibilitySupportEnabled property', () => {
    it('is mutable', () => {
      const values = [false, true, false, true];
      const setters: Array<(arg: boolean) => void> = [
        (value) => { app.accessibilitySupportEnabled = value; },
        (value) => app.setAccessibilitySupportEnabled(value)
      ];
      const getters: Array<() => boolean> = [
        () => app.accessibilitySupportEnabled,
        () => app.isAccessibilitySupportEnabled()
      ];
      for (const value of values) {
        for (const set of setters) {
          set(value);
          for (const get of getters) expect(get()).to.eql(value);
        }
      }
    });
  });

  ifdescribe(process.platform === 'win32')('setJumpList(categories)', () => {
    it('throws an error when categories is not null or an array', () => {
      expect(() => {
        app.setJumpList('string' as any);
      }).to.throw('Argument must be null or an array of categories');
    });

    it('can get jump list settings', () => {

Review comment (suggestion):
```suggestion
      const values = [false, true];
```

Code after:
        restoreState: false,
        executableWillLaunchAtLogin: true,
        launchItems: [{
          name: 'additionalEntry',
          path: process.execPath,
          args: ['arg1'],
          scope: 'user',
          enabled: true
        }]
      };

      app.setLoginItemSettings({ openAtLogin: true, name: 'additionalEntry', enabled: false, args: ['arg1'] });
      let appProcess = cp.spawn('reg', [...regAddArgs, '020000000000000000000000']);
      await once(appProcess, 'exit');
      expect(app.getLoginItemSettings()).to.deep.equal(expectation);

      app.setLoginItemSettings({ openAtLogin: true, name: 'additionalEntry', enabled: false, args: ['arg1'] });
      appProcess = cp.spawn('reg', [...regAddArgs, '000000000000000000000000']);
      await once(appProcess, 'exit');
      expect(app.getLoginItemSettings()).to.deep.equal(expectation);
    });
  });

  ifdescribe(process.platform !== 'linux')('accessibilitySupportEnabled property', () => {
    it('is mutable', () => {
      const values = [false, true, false];
      const setters: Array<(arg: boolean) => void> = [
        (value) => { app.accessibilitySupportEnabled = value; },
        (value) => app.setAccessibilitySupportEnabled(value)
      ];
      const getters: Array<() => boolean> = [
        () => app.accessibilitySupportEnabled,
        () => app.isAccessibilitySupportEnabled()
      ];
      for (const value of values) {
        for (const set of setters) {
          set(value);
          for (const get of getters) expect(get()).to.eql(value);
        }
      }
    });
  });

  ifdescribe(process.platform === 'win32')('setJumpList(categories)', () => {
    it('throws an error when categories is not null or an array', () => {
      expect(() => {
        app.setJumpList('string' as any);
      }).to.throw('Argument must be null or an array of categories');
    });

    it('can get jump list settings', () => {