<commit_before>'use strict';

const path = require('path');
const helpers = require('yeoman-test');
const assert = require('yeoman-assert');

describe('resource', () => {

  describe('when using restangular', () => {

    before(done => {
      this.generator = helpers
        .run(path.join(__dirname, '../generators/app'))
        .withPrompts({
          resource: 'restangular'
        })
        .toPromise()
        .then(() => done());
    });

    it('should add restangular to the package.json', () => {
      assert.fileContent('package.json', 'restangular');
    });

    it('should import restangular in the angular modules', () => {
      assert.fileContent('src/app/app.js', 'import restangular from \'restangular\'');
      assert.fileContent('src/app/app.js', /angular\.module\([\s\S]*, [\s\S]*?restangular/);<commit_msg>test(resource): update restangular tests<commit_after>'use strict';

const path = require('path');
const helpers = require('yeoman-test');
const assert = require('yeoman-assert');

describe('resource', () => {

  describe('when using restangular', () => {

    before(done => {
      this.generator = helpers
        .run(path.join(__dirname, '../generators/app'))
        .withPrompts({
          resource: 'restangular'
        })
        .toPromise()
        .then(() => done());
    });

    it('should add restangular to the package.json', () => {
      assert.fileContent('package.json', 'restangular');
    });

    it('should import restangular in the angular modules', () => {
      assert.fileContent('src/app/app.js', 'import \'lodash\'');
      assert.fileContent('src/app/app.js', 'import \'restangular\'');
      assert.fileContent('src/app/app.js', /angular\.module\([\s\S]*, [\s\S]*?restangular/);
{'fraction_non_alphanumeric': 0.19703026841804683, 'fraction_numerical': 0.0, 'mean_word_length': 3.0839160839160837, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3910766', 'n_tokens_mistral': 531, 'n_tokens_neox': 512, 'n_words': 101}