How to use the yeoman-assert.equal function in yeoman-assert

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 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 binduwavell / generator-alfresco / test / test-base-generator.js View on Github external
it('sets appropriate filter function', function () {
      const myprompt = state.generator.processedPrompts[1];
      assert.ok(myprompt.hasOwnProperty('filter'));
      const filter = myprompt.filter;
      let v = filter('');
      assert.equal(v, undefined);
      v = filter(123);
      assert.equal(v, '123');
    });
github yeoman / generator / test / base.js View on Github external
it('set the CWD where `.yo-rc.json` is found', function() {
      const projectDir = path.join(__dirname, 'fixtures/dummy-project');
      const subdir = path.join(projectDir, 'subdir');
      process.chdir(subdir);
      this.env.cwd = process.cwd();

      const dummy = new this.Dummy(['foo'], {
        resolved: 'ember/all',
        env: this.env
      });

      assert.equal(process.cwd(), projectDir);
      assert.equal(dummy.destinationPath(), projectDir);
      assert.equal(dummy.contextRoot, subdir);
    });
github binduwavell / generator-alfresco / test / test-base-generator.js View on Github external
it('handles option values', function () {
      assert.equal(state.bail, false);
      assert.equal(state.myargument, 'my-argument');
      assert.equal(state.myprompt, 'option value');
    });
github yeoman / generator / test / base.js View on Github external
return function() {
          assert.equal(e, lifecycle.shift());

          if (e === 'end') {
            done();
          }
        };
      }

yeoman-assert

Assert utility from yeoman

BSD-2-Clause
Latest version published 7 years ago

Package Health Score

57 / 100
Full package analysis