test-creation.js 865 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*global describe, beforeEach, it*/
  2. 'use strict';
  3. var path = require('path');
  4. var helpers = require('yeoman-generator').test;
  5. describe('threejs-boilerplate generator', function () {
  6. beforeEach(function (done) {
  7. helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
  8. if (err) {
  9. return done(err);
  10. }
  11. this.app = helpers.createGenerator('threejs-boilerplate:app', [
  12. '../../app'
  13. ]);
  14. done();
  15. }.bind(this));
  16. });
  17. it('creates expected files', function (done) {
  18. var expected = [
  19. // add files you expect to exist here.
  20. '.jshintrc',
  21. '.editorconfig'
  22. ];
  23. helpers.mockPrompt(this.app, {
  24. 'someOption': true
  25. });
  26. this.app.options['skip-install'] = true;
  27. this.app.run({}, function () {
  28. helpers.assertFiles(expected);
  29. done();
  30. });
  31. });
  32. });