import rewiremock from 'rewiremock';
import '../../../mocks/electron';

import { expect } from 'chai';
import 'mocha';
import { isDev } from './dev';

describe('Development Mode Service', () => {
  before(() => {
    rewiremock.enable();
  });

  after(() => {
    rewiremock.disable();
  });

  it('correctly identifies the development process argument', () => {
    process.argv.push('--dev');
    expect(isDev()).to.be.true;
    process.argv = process.argv.filter((value) => value !== '--dev');
    expect(isDev()).to.be.false;
  });
});
