<commit_before>'use strict';

// get command from index.js
let cmd = commands.find(c => c.topic === 'maintenance');

describe('maintenance', () => {
  // prevent stdout/stderr from displaying
  // redirects to cli.stdout/cli.stderr instead
  beforeEach(() => cli.mockConsole());

  it('shows the maintenance is on', () => {
    // mock out API
    let api = nock('https://api.heroku.com:443')
      .get('/apps/myapp')
      .reply(200, {maintenance: true});

    // run the command
    return cmd.run({app: 'myapp'})
    // check stdout
    .then(() => expect(cli.stdout).to.equal('on\n'))
    // check stderr
    .then(() => expect(cli.stderr).to.equal(''))
    // ensure all nock HTTP expectations are met
    .then(() => api.done());
  });

  it('shows the maintenance is off', () => {
    let api = nock('https://api.heroku.com:443')
      .get('/apps/myapp')
      .reply(200, {maintenance: false});
    return cmd.run({app: 'myapp'})
    .then(() => expect(cli.stdout).to.equal('off\n'))
    .then(() => api.done());
  });
});
<commit_msg>minor testing doc update<commit_after>'use strict';

// get command from index.js
let cmd = commands.find(c => c.topic === 'maintenance');

describe('maintenance', () => {
  // prevent stdout/stderr from displaying
  // redirects to cli.stdout/cli.stderr instead
  beforeEach(() => cli.mockConsole());

  it('shows that maintenance is on', () => {
    // mock out API
    let api = nock('https://api.heroku.com:443')
      .get('/apps/myapp')
      .reply(200, {maintenance: true});

    // run the command
    return cmd.run({app: 'myapp'})
    // check stdout
    .then(() => expect(cli.stdout).to.equal('on\n'))
    // check stderr
    .then(() => expect(cli.stderr).to.equal(''))
    // ensure all nock HTTP expectations are met
    .then(() => api.done());
  });

  it('shows that maintenance is off', () => {
    let api = nock('https://api.heroku.com:443')
      .get('/apps/myapp')
      .reply(200, {maintenance: false});
    return cmd.run({app: 'myapp'})
    .then(() => expect(cli.stdout).to.equal('off\n'))
    .then(() => api.done());
  });
});

{'fraction_non_alphanumeric': 0.21472684085510688, 'fraction_numerical': 0.01140142517814727, 'mean_word_length': 2.885608856088561, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2764709', 'n_tokens_mistral': 723, 'n_tokens_neox': 695, 'n_words': 161}