Revert "run jest-codemods on .spec.js files, move generator-exercises back in"
This reverts commit 7a001e0fdb.
			
			
This commit is contained in:
		
							parent
							
								
									d79bdb9312
								
							
						
					
					
						commit
						4efb36f3aa
					
				| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require('expect');const caesar = require('./caesar')
 | 
			
		||||
const caesar = require('./caesar')
 | 
			
		||||
 | 
			
		||||
describe('caesar', function() {
 | 
			
		||||
  it('works with single letters', function() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require('expect');const calculator = require ('./calculator.js');
 | 
			
		||||
const calculator = require ('./calculator.js');
 | 
			
		||||
 | 
			
		||||
describe('add', function() {
 | 
			
		||||
	it('adds 0 and 0', function() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require('expect');const fibonacci = require('./fibonacci')
 | 
			
		||||
const fibonacci = require('./fibonacci')
 | 
			
		||||
 | 
			
		||||
describe('fibonacci', function() {
 | 
			
		||||
  it('works', function() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require('expect');let findTheOldest = require('./findTheOldest')
 | 
			
		||||
let findTheOldest = require('./findTheOldest')
 | 
			
		||||
 | 
			
		||||
describe('findTheOldest', function() {
 | 
			
		||||
  it('finds the oldest person!', function() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,11 +0,0 @@
 | 
			
		|||
root = true
 | 
			
		||||
 | 
			
		||||
[*]
 | 
			
		||||
indent_style = space
 | 
			
		||||
indent_size = 2
 | 
			
		||||
charset = utf-8
 | 
			
		||||
trim_trailing_whitespace = true
 | 
			
		||||
insert_final_newline = true
 | 
			
		||||
 | 
			
		||||
[*.md]
 | 
			
		||||
trim_trailing_whitespace = false
 | 
			
		||||
| 
						 | 
				
			
			@ -1,2 +0,0 @@
 | 
			
		|||
coverage
 | 
			
		||||
**/templates
 | 
			
		||||
| 
						 | 
				
			
			@ -1 +0,0 @@
 | 
			
		|||
* text=auto
 | 
			
		||||
| 
						 | 
				
			
			@ -1,2 +0,0 @@
 | 
			
		|||
node_modules
 | 
			
		||||
coverage
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +0,0 @@
 | 
			
		|||
language: node_js
 | 
			
		||||
node_js:
 | 
			
		||||
  - 7
 | 
			
		||||
  - 6
 | 
			
		||||
  - 4
 | 
			
		||||
| 
						 | 
				
			
			@ -1,9 +0,0 @@
 | 
			
		|||
{
 | 
			
		||||
  "generator-node": {
 | 
			
		||||
    "promptValues": {
 | 
			
		||||
      "authorName": "Cody Loyd",
 | 
			
		||||
      "authorEmail": "codyloyd@gmail.com",
 | 
			
		||||
      "authorUrl": "codyloyd.com"
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,21 +0,0 @@
 | 
			
		|||
The MIT License (MIT)
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2017 Cody Loyd <codyloyd@gmail.com> (codyloyd.com)
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
in the Software without restriction, including without limitation the rights
 | 
			
		||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
furnished to do so, subject to the following conditions:
 | 
			
		||||
 | 
			
		||||
The above copyright notice and this permission notice shall be included in
 | 
			
		||||
all copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
THE SOFTWARE.
 | 
			
		||||
| 
						 | 
				
			
			@ -1,36 +0,0 @@
 | 
			
		|||
# generator-exercise [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
 | 
			
		||||
> generates boilerplate for The Odin Project exercises
 | 
			
		||||
 | 
			
		||||
## Installation
 | 
			
		||||
 | 
			
		||||
First, install [Yeoman](http://yeoman.io) and generator-exercise using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
npm install -g yo
 | 
			
		||||
npm install -g generator-exercise
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Then generate your new project:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
yo exercise
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Getting To Know Yeoman
 | 
			
		||||
 | 
			
		||||
 * Yeoman has a heart of gold.
 | 
			
		||||
 * Yeoman is a person with feelings and opinions, but is very easy to work with.
 | 
			
		||||
 * Yeoman can be too opinionated at times but is easily convinced not to be.
 | 
			
		||||
 * Feel free to [learn more about Yeoman](http://yeoman.io/).
 | 
			
		||||
 | 
			
		||||
## License
 | 
			
		||||
 | 
			
		||||
MIT © [Cody Loyd](codyloyd.com)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[npm-image]: https://badge.fury.io/js/generator-exercise.svg
 | 
			
		||||
[npm-url]: https://npmjs.org/package/generator-exercise
 | 
			
		||||
[travis-image]: https://travis-ci.org/codyloyd/generator-exercise.svg?branch=master
 | 
			
		||||
[travis-url]: https://travis-ci.org/codyloyd/generator-exercise
 | 
			
		||||
[daviddm-image]: https://david-dm.org/codyloyd/generator-exercise.svg?theme=shields.io
 | 
			
		||||
[daviddm-url]: https://david-dm.org/codyloyd/generator-exercise
 | 
			
		||||
| 
						 | 
				
			
			@ -1,41 +0,0 @@
 | 
			
		|||
'use strict';
 | 
			
		||||
const Generator = require('yeoman-generator');
 | 
			
		||||
const chalk = require('chalk');
 | 
			
		||||
const yosay = require('yosay');
 | 
			
		||||
 | 
			
		||||
module.exports = class extends Generator {
 | 
			
		||||
  prompting() {
 | 
			
		||||
    // Have Yeoman greet the user.
 | 
			
		||||
    this.log(chalk.red('Let\'s do this'));
 | 
			
		||||
 | 
			
		||||
    const prompts = [{
 | 
			
		||||
      type: 'input',
 | 
			
		||||
      name: 'title',
 | 
			
		||||
      message: 'Enter the exercise title',
 | 
			
		||||
      default: 'title'
 | 
			
		||||
    }];
 | 
			
		||||
 | 
			
		||||
    return this.prompt(prompts).then(props => {
 | 
			
		||||
      // To access props later use this.props.someAnswer;
 | 
			
		||||
      this.props = props;
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  writing() {
 | 
			
		||||
    this.fs.copyTpl(
 | 
			
		||||
      this.templatePath(`title.js`),
 | 
			
		||||
      this.destinationPath(`${this.props.title}.js`),
 | 
			
		||||
      {title: this.props.title}
 | 
			
		||||
    );
 | 
			
		||||
    this.fs.copyTpl(
 | 
			
		||||
      this.templatePath(`title.spec.js`),
 | 
			
		||||
      this.destinationPath(`${this.props.title}.spec.js`),
 | 
			
		||||
      {title: this.props.title}
 | 
			
		||||
    );
 | 
			
		||||
    this.fs.copyTpl(
 | 
			
		||||
      this.templatePath(`README.md`),
 | 
			
		||||
      this.destinationPath(`README.md`),
 | 
			
		||||
      {title: this.props.title}
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			@ -1,2 +0,0 @@
 | 
			
		|||
# Exercise XX - <%= title %>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1 +0,0 @@
 | 
			
		|||
<%= title %>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +0,0 @@
 | 
			
		|||
let <%= title %> = function() {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = <%= title %>
 | 
			
		||||
| 
						 | 
				
			
			@ -1,8 +0,0 @@
 | 
			
		|||
let <%= title %> = require('./<%=title%>')
 | 
			
		||||
 | 
			
		||||
describe('<%=title%>', function() {
 | 
			
		||||
  it('EDITME', function() {
 | 
			
		||||
    expect(<%=title%>()).toEqual(' ');
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
});
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -1,51 +0,0 @@
 | 
			
		|||
{
 | 
			
		||||
  "name": "generator-exercise",
 | 
			
		||||
  "version": "0.0.0",
 | 
			
		||||
  "description": "generates boilerplate for The Odin Project exercises",
 | 
			
		||||
  "homepage": "theodinproject.com",
 | 
			
		||||
  "author": {
 | 
			
		||||
    "name": "Cody Loyd",
 | 
			
		||||
    "email": "codyloyd@gmail.com",
 | 
			
		||||
    "url": "codyloyd.com"
 | 
			
		||||
  },
 | 
			
		||||
  "files": [
 | 
			
		||||
    "generators"
 | 
			
		||||
  ],
 | 
			
		||||
  "main": "generators/index.js",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "lame",
 | 
			
		||||
    "yeoman-generator"
 | 
			
		||||
  ],
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "yeoman-test": "^1.6.0",
 | 
			
		||||
    "yeoman-assert": "^3.0.0",
 | 
			
		||||
    "nsp": "^2.6.3",
 | 
			
		||||
    "eslint": "^4.1.0",
 | 
			
		||||
    "eslint-config-xo-space": "^0.16.0",
 | 
			
		||||
    "jest": "^19.0.2",
 | 
			
		||||
    "jest-cli": "^20.0.0"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "chalk": "^1.1.3",
 | 
			
		||||
    "extend": "^3.0.2",
 | 
			
		||||
    "yeoman-generator": "^1.0.0",
 | 
			
		||||
    "yosay": "^2.0.0"
 | 
			
		||||
  },
 | 
			
		||||
  "jest": {
 | 
			
		||||
    "testEnvironment": "node"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "prepublish": "nsp check",
 | 
			
		||||
    "pretest": "eslint . --fix",
 | 
			
		||||
    "test": "jest"
 | 
			
		||||
  },
 | 
			
		||||
  "eslintConfig": {
 | 
			
		||||
    "extends": "xo-space",
 | 
			
		||||
    "env": {
 | 
			
		||||
      "jest": true,
 | 
			
		||||
      "node": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "repository": "git@github.com:TheOdinProject/javascript-exercises.git",
 | 
			
		||||
  "license": "MIT"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require('expect');let getTheTitles = require('./getTheTitles')
 | 
			
		||||
let getTheTitles = require('./getTheTitles')
 | 
			
		||||
 | 
			
		||||
describe('getTheTitles', function() {
 | 
			
		||||
    const books = [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require('expect');const { expect } = require('@jest/globals');
 | 
			
		||||
const { expect } = require('@jest/globals');
 | 
			
		||||
const helloWorld = require('./helloWorld');
 | 
			
		||||
 | 
			
		||||
// describe('Hello World', function() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require('expect');const leapYears = require('./leapYears')
 | 
			
		||||
const leapYears = require('./leapYears')
 | 
			
		||||
 | 
			
		||||
describe('leapYears', function() {
 | 
			
		||||
  it('works with non century years', function() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require('expect');const palindromes = require('./palindromes')
 | 
			
		||||
const palindromes = require('./palindromes')
 | 
			
		||||
 | 
			
		||||
describe('palindromes', function() {
 | 
			
		||||
  it('works with single words', function() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require("expect");//  Topics
 | 
			
		||||
//  Topics
 | 
			
		||||
 | 
			
		||||
//  * modules
 | 
			
		||||
//  * strings
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
const expect = require('expect');const removeFromArray = require('./removeFromArray')
 | 
			
		||||
const removeFromArray = require('./removeFromArray')
 | 
			
		||||
 | 
			
		||||
describe('removeFromArray', function() {
 | 
			
		||||
  it('removes a single value', function() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue