<commit_before>import * as path from 'path';
import { ng } from '../../../utils/process';
import { oneLine } from 'common-tags';

export default function () {
  return ng('generate', 'component', 'test-component')
    .then((output) => {
      if (!output.match(/update src[\\|\/]app[\\|\/]app.module.ts/)) {
        throw new Error(oneLine`
          Expected to match
          "update src${path.sep}app${path.sep}app.module.ts"
          in ${output}.`);
      }
    })
    .then(() => ng('generate', 'component', 'test-component'))
    .then((output) => {
      if (!output.match(/identical src[\\|\/]app[\\|\/]app.module.ts/)) {
        throw new Error(oneLine`
          Expected to match
          "identical src${path.sep}app${path.sep}app.module.ts"
          in ${output}.`);
      }
    });
}<commit_msg>test: fix failing generate duplicate component e2e test<commit_after>import * as path from 'path';
import { ng } from '../../../utils/process';
import { oneLine } from 'common-tags';

export default function () {
  return ng('generate', 'component', 'test-component')
    .then((output) => {
      if (!output.stdout.match(/update src[\\|\/]app[\\|\/]app.module.ts/)) {
        throw new Error(oneLine`
          Expected to match
          "update src${path.sep}app${path.sep}app.module.ts"
          in ${output}.`);
      }
    })
    .then(() => ng('generate', 'component', 'test-component'))
    .then((output) => {
      if (!output.stdout.match(/identical src[\\|\/]app[\\|\/]app.module.ts/)) {
        throw new Error(oneLine`
          Expected to match
          "identical src${path.sep}app${path.sep}app.module.ts"
          in ${output}.`);
      }
    });
}
{'fraction_non_alphanumeric': 0.20818505338078291, 'fraction_numerical': 0.0005931198102016608, 'mean_word_length': 2.374, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '5626104', 'n_tokens_mistral': 535, 'n_tokens_neox': 535, 'n_words': 111}