How to use yeoman-assert - 10 common examples

To help you get started, we’ve selected a few yeoman-assert examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bastienmichaux / generator-jhipster-db-helper / test / test-dbh.js View on Github external
it('works', function () {
            // write a temp file
            let tempFilePath = path.join(__dirname, './testDir/tempDir/myTest.json');
            let content = {foo: 'bar'};
            let replacedContent = {foo: 'fuz'};

            assert.noFile(tempFilePath);
            fse.writeJsonSync(tempFilePath, content);
            assert.file(tempFilePath);
            assert.fileContent(tempFilePath, 'bar');
            dbh.replaceContent(tempFilePath, 'bar', 'fuz', null);
            assert.fileContent(tempFilePath, 'fuz');
            fs.unlinkSync(tempFilePath);
            assert.noFile(tempFilePath);
        });
    });
github binduwavell / generator-alfresco / test / test-base-generator.js View on Github external
it('sets appropriate validate function', function () {
      const myprompt = state.generator.processedPrompts[1];
      assert.ok(myprompt.hasOwnProperty('validate'));
      const validate = myprompt.validate;
      let v = validate('');
      // In IntelliJ, we get the ASCII back, in a terminal we don't. Just stripping it!
      assert.equal(stripAnsi(v), 'The required myprompt value is missing or invalid');
      v = validate('a value');
      assert.equal(v, true);
    });
github Veams / generator-veams / test / veams-packages-spec.js View on Github external
it('adds _get-media.scss and import state to sass file', function () {
			assert.file(srcPath + 'core/styles/_get-media.scss');
			assert.fileContent(srcPath + 'app.scss', /@import \"core\/styles\/get-media\"/);
		});
github Veams / generator-veams / test / grunt-csscomb-spec.js View on Github external
it('creates helper files', function () {
		assert.file(helperPath + "_grunt/csscomb.js");
		assert.file(helperPath + "task-configs/csscomb.json");
	});
github Veams / generator-veams / test / grunt-webfont-spec.js View on Github external
it('creates helper files', function () {
		assert.file(helperPath + '_grunt/webfont.js');
		assert.file(helperPath + '_grunt/custom/iconbuilder.js');
	});
github Veams / generator-veams / test / gulp-stylelint-spec.js View on Github external
it('creates helper files', function () {
			assert.file(helperPath + '_gulp/hinting.js');
			assert.file(helperPath + 'task-configs/stylelint.config.js');
		});
github Veams / generator-veams / test / grunt-grunticon-spec.js View on Github external
it('creates helper files', function () {
		assert.file(helperPath + "_grunt/grunticon.js");
		assert.file(helperPath + "_grunt/replace.js");
	});
github micromata / generator-baumeister / __tests__ / test-app.js View on Github external
it('should have authors name in package.json and LICENSE', () => {
    const packageJson = JSON.parse(fs.readFileSync('package.json'));
    const regex = new RegExp(escapeStringRegexp(prompts.authorName), '');

    packageJson.should.have
      .propertyByPath('author', 'name')
      .eql(prompts.authorName);
    assert.fileContent('LICENSE', regex);
  });
github micromata / generator-baumeister / __tests__ / test-app.js View on Github external
it('should render project name and description in README.md', () => {
    let regex = new RegExp(escapeStringRegexp(prompts.projectDescription), '');
    assert.fileContent('README.md', regex);
    regex = new RegExp(
      escapeStringRegexp(_s.titleize(prompts.projectName)),
      ''
    );
    assert.fileContent('README.md', regex);
  });
github micromata / generator-baumeister / __tests__ / test-app.js View on Github external
it('should render project name and description in README.md', () => {
    let regex = new RegExp(escapeStringRegexp(prompts.projectDescription), '');
    assert.fileContent('README.md', regex);
    regex = new RegExp(
      escapeStringRegexp(_s.titleize(prompts.projectName)),
      ''
    );
    assert.fileContent('README.md', regex);
  });

yeoman-assert

Assert utility from yeoman

BSD-2-Clause
Latest version published 6 years ago

Package Health Score

57 / 100
Full package analysis