From edc5832d2d9425626b9e7b059ba1b40f701e2b8c Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Fri, 23 Mar 2018 17:35:32 -0600 Subject: [PATCH] add setup cypress instructions --- .gitignore | 4 ++ INSTRUCTIONS.md | 36 +++++++++++++++++- appveyor.yml | 4 +- .../calculator.solution/.babelrc.js | 2 +- .../calculator.solution/cypress.json | 4 ++ .../cypress/e2e/calculator.js | 6 +++ .../cypress/fixtures/example.json | 1 + .../cypress/plugins/index.js | 17 +++++++++ .../cypress/support/commands.js | 25 ++++++++++++ .../cypress/support/index.js | 20 ++++++++++ .../calculator.solution/index.html | 0 .../calculator.solution/jest.config.js | 0 .../calculator.solution/package.json | 11 +++++- .../src/__tests__/auto-scaling-text.js | 0 .../src/__tests__/calculator.js | 0 .../src/__tests__/utils.js | 0 .../src/auto-scaling-text.js | 0 .../src/auto-scaling-text.module.css | 0 .../src/calculator-display.js | 0 .../src/calculator-display.module.css | 0 .../calculator.solution/src/calculator.js | 0 .../src/calculator.module.css | 0 .../KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 | Bin .../fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 | Bin .../calculator.solution/src/global.css | 0 .../calculator.solution/src/index.js | 0 .../calculator.solution/src/utils.js | 0 .../test/setup-test-framework.js | 0 .../calculator.solution/test/style-mock.js | 0 .../calculator.solution/webpack.config.js | 0 .../calculator/.babelrc.js | 0 .../calculator/index.html | 0 .../calculator/package.json | 4 +- .../calculator/src/auto-scaling-text.js | 0 .../src/auto-scaling-text.module.css | 0 .../calculator/src/calculator-display.js | 0 .../src/calculator-display.module.css | 0 .../calculator/src/calculator.js | 0 .../calculator/src/calculator.module.css | 0 .../KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 | Bin .../fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 | Bin .../KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 | Bin .../calculator/src/global.css | 0 .../calculator/src/index.js | 0 .../calculator/src/utils.js | 0 .../calculator/webpack.config.js | 0 other/jest.config.js | 2 +- .../KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk (1).woff2 | Bin 792 -> 0 bytes .../KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk (1).woff2 | Bin 792 -> 0 bytes scripts/install.js | 4 +- 59 files changed, 131 insertions(+), 9 deletions(-) rename other/{setup-jest => configuration}/calculator.solution/.babelrc.js (93%) create mode 100644 other/configuration/calculator.solution/cypress.json create mode 100644 other/configuration/calculator.solution/cypress/e2e/calculator.js create mode 100644 other/configuration/calculator.solution/cypress/fixtures/example.json create mode 100644 other/configuration/calculator.solution/cypress/plugins/index.js create mode 100644 other/configuration/calculator.solution/cypress/support/commands.js create mode 100644 other/configuration/calculator.solution/cypress/support/index.js rename other/{setup-jest => configuration}/calculator.solution/index.html (100%) rename other/{setup-jest => configuration}/calculator.solution/jest.config.js (100%) rename other/{setup-jest => configuration}/calculator.solution/package.json (75%) rename other/{setup-jest => configuration}/calculator.solution/src/__tests__/auto-scaling-text.js (100%) rename other/{setup-jest => configuration}/calculator.solution/src/__tests__/calculator.js (100%) rename other/{setup-jest => configuration}/calculator.solution/src/__tests__/utils.js (100%) rename other/{setup-jest => configuration}/calculator.solution/src/auto-scaling-text.js (100%) rename other/{setup-jest => configuration}/calculator.solution/src/auto-scaling-text.module.css (100%) rename other/{setup-jest => configuration}/calculator.solution/src/calculator-display.js (100%) rename other/{setup-jest => configuration}/calculator.solution/src/calculator-display.module.css (100%) rename other/{setup-jest => configuration}/calculator.solution/src/calculator.js (100%) rename other/{setup-jest => configuration}/calculator.solution/src/calculator.module.css (100%) rename other/{setup-jest => configuration}/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 (100%) rename other/{setup-jest => configuration}/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator.solution/src/global.css (100%) rename other/{setup-jest => configuration}/calculator.solution/src/index.js (100%) rename other/{setup-jest => configuration}/calculator.solution/src/utils.js (100%) rename other/{setup-jest => configuration}/calculator.solution/test/setup-test-framework.js (100%) rename other/{setup-jest => configuration}/calculator.solution/test/style-mock.js (100%) rename other/{setup-jest => configuration}/calculator.solution/webpack.config.js (100%) rename other/{setup-jest => configuration}/calculator/.babelrc.js (100%) rename other/{setup-jest => configuration}/calculator/index.html (100%) rename other/{setup-jest => configuration}/calculator/package.json (89%) rename other/{setup-jest => configuration}/calculator/src/auto-scaling-text.js (100%) rename other/{setup-jest => configuration}/calculator/src/auto-scaling-text.module.css (100%) rename other/{setup-jest => configuration}/calculator/src/calculator-display.js (100%) rename other/{setup-jest => configuration}/calculator/src/calculator-display.module.css (100%) rename other/{setup-jest => configuration}/calculator/src/calculator.js (100%) rename other/{setup-jest => configuration}/calculator/src/calculator.module.css (100%) rename other/{setup-jest => configuration}/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 (100%) rename other/{setup-jest => configuration}/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 (100%) rename other/{setup-jest => configuration}/calculator/src/global.css (100%) rename other/{setup-jest => configuration}/calculator/src/index.js (100%) rename other/{setup-jest => configuration}/calculator/src/utils.js (100%) rename other/{setup-jest => configuration}/calculator/webpack.config.js (100%) delete mode 100644 other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk (1).woff2 delete mode 100644 other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk (1).woff2 diff --git a/.gitignore b/.gitignore index 01888845..8b8c3da8 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,7 @@ dist .eslintcache /client/other/shared /server/other/shared +/other/configuration/calculator/cypress/videos +/other/configuration/calculator/cypress/screenshots +/other/configuration/calculator.solution/cypress/videos +/other/configuration/calculator.solution/cypress/screenshots diff --git a/INSTRUCTIONS.md b/INSTRUCTIONS.md index 0730e1fd..6d27cc8a 100644 --- a/INSTRUCTIONS.md +++ b/INSTRUCTIONS.md @@ -342,7 +342,7 @@ See section called ["Jest"](#jest) below in the shared content **Instruction**: -* Navigate to `./other/setup-jest/calculator` +* Navigate to `./other/configuration/calculator` * Go ahead and run `npm run dev` and open up `localhost:8080` to see the app * `npm install --save-dev jest` * Create a `test` script in `package.json` to `jest` @@ -486,6 +486,40 @@ _optional_ ### Configuring Cypress +**Instructions**: + +1. Change directories to `other/configuration/calculator` (further directories relative to this) +2. Run `npm install --save-dev cypress` +3. Run `npx cypress open`. Play around with it, then stop the process. +4. Explore `./cypress` + +Now let's have it run on our codebase + +1. In one terminal tab/window start the dev server `npm run dev`. Note this is running on port `8080` +2. Open `./cypress.json` and add `"baseUrl": "http://localhost:8080"` and `"integrationFolder": "cypress/e2e"` +3. Delete `./cypress/integration` and copy `../calculator.solution/e2e/calculator.js` to `./cypress/e2e/calculator.js` +4. Start cypress over again: `npx cypress open` and run the test. It passes! + +Now let's make this a script + +1. `npm install --save-dev npm-run-all` +2. Add a `test:e2e:dev` script: `npm-run-all --parallel --race dev cy:open` +3. Add a `cy:open` script: `cypress open` +4. Run `npm run test:e2e:dev`. It works! + +Now let's make this work for CI + +1. Add a `test:e2e` script: `npm-run-all --parallel --race start cy:run` +2. Add a `cy:run` script: `cypress run` +3. Add a `pretest:e2e` script: `npm run build` +4. Run `npm run test:e2e`. It works! + +**Exercise**: + +> No exercise here. It would be really boring I think... + +**Takeaways**: + * TODO ### End-to-end testing diff --git a/appveyor.yml b/appveyor.yml index d0c2bab3..4b0e7edf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,7 @@ cache: - ./client/node_modules -> ./client/package.json - ./server/node_modules -> ./server/package.json - ./shared/node_modules -> ./shared/package.json - - ./other/setup-jest/calculator/node_modules -> ./other/setup-jest/calculator/package.json - - ./other/setup-jest/calculator.solution/node_modules -> ./other/setup-jest/calculator.solution/package.json + - ./other/configuration/calculator/node_modules -> ./other/configuration/calculator/package.json + - ./other/configuration/calculator.solution/node_modules -> ./other/configuration/calculator.solution/package.json build: off diff --git a/other/setup-jest/calculator.solution/.babelrc.js b/other/configuration/calculator.solution/.babelrc.js similarity index 93% rename from other/setup-jest/calculator.solution/.babelrc.js rename to other/configuration/calculator.solution/.babelrc.js index e2592be3..e6d57f0e 100644 --- a/other/setup-jest/calculator.solution/.babelrc.js +++ b/other/configuration/calculator.solution/.babelrc.js @@ -6,5 +6,5 @@ module.exports = { 'transform-class-properties', 'transform-object-rest-spread', isTest ? 'dynamic-import-node' : null, - ], + ].filter(Boolean), } diff --git a/other/configuration/calculator.solution/cypress.json b/other/configuration/calculator.solution/cypress.json new file mode 100644 index 00000000..a0685eea --- /dev/null +++ b/other/configuration/calculator.solution/cypress.json @@ -0,0 +1,4 @@ +{ + "baseUrl": "http://localhost:8080", + "integrationFolder": "cypress/e2e" +} diff --git a/other/configuration/calculator.solution/cypress/e2e/calculator.js b/other/configuration/calculator.solution/cypress/e2e/calculator.js new file mode 100644 index 00000000..c873451b --- /dev/null +++ b/other/configuration/calculator.solution/cypress/e2e/calculator.js @@ -0,0 +1,6 @@ +/* globals cy */ +describe('calculator', () => { + it('can visit the app', () => { + cy.visit('/') + }) +}) diff --git a/other/configuration/calculator.solution/cypress/fixtures/example.json b/other/configuration/calculator.solution/cypress/fixtures/example.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/other/configuration/calculator.solution/cypress/fixtures/example.json @@ -0,0 +1 @@ +{} diff --git a/other/configuration/calculator.solution/cypress/plugins/index.js b/other/configuration/calculator.solution/cypress/plugins/index.js new file mode 100644 index 00000000..84b7cb46 --- /dev/null +++ b/other/configuration/calculator.solution/cypress/plugins/index.js @@ -0,0 +1,17 @@ +// *********************************************************** +// This example plugins/index.js can be used to load plugins +// +// You can change the location of this file or turn off loading +// the plugins file with the 'pluginsFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/plugins-guide +// *********************************************************** + +// This function is called when a project is opened or re-opened (e.g. due to +// the project's config changing) + +module.exports = (_on, _config) => { + // `on` is used to hook into various events Cypress emits + // `config` is the resolved Cypress config +} diff --git a/other/configuration/calculator.solution/cypress/support/commands.js b/other/configuration/calculator.solution/cypress/support/commands.js new file mode 100644 index 00000000..c1f5a772 --- /dev/null +++ b/other/configuration/calculator.solution/cypress/support/commands.js @@ -0,0 +1,25 @@ +// *********************************************** +// This example commands.js shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add("login", (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This is will overwrite an existing command -- +// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/other/configuration/calculator.solution/cypress/support/index.js b/other/configuration/calculator.solution/cypress/support/index.js new file mode 100644 index 00000000..d68db96d --- /dev/null +++ b/other/configuration/calculator.solution/cypress/support/index.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/index.js is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') diff --git a/other/setup-jest/calculator.solution/index.html b/other/configuration/calculator.solution/index.html similarity index 100% rename from other/setup-jest/calculator.solution/index.html rename to other/configuration/calculator.solution/index.html diff --git a/other/setup-jest/calculator.solution/jest.config.js b/other/configuration/calculator.solution/jest.config.js similarity index 100% rename from other/setup-jest/calculator.solution/jest.config.js rename to other/configuration/calculator.solution/jest.config.js diff --git a/other/setup-jest/calculator.solution/package.json b/other/configuration/calculator.solution/package.json similarity index 75% rename from other/setup-jest/calculator.solution/package.json rename to other/configuration/calculator.solution/package.json index 2b9a407a..6439a395 100644 --- a/other/setup-jest/calculator.solution/package.json +++ b/other/configuration/calculator.solution/package.json @@ -6,8 +6,14 @@ "scripts": { "test": "jest --coverage", "test:watch": "jest --watch", + "cy:run": "cypress run", + "cy:open": "cypress open", + "pretest:e2e": "npm run build", + "test:e2e": "npm-run-all --parallel --race start cy:run", + "test:e2e:dev": "npm-run-all --parallel --race dev cy:open", "dev": "webpack-dev-server --mode=development", - "build": "webpack --mode=production" + "build": "webpack --mode=production", + "start": "serve -s dist --port 8080" }, "keywords": [], "author": "Kent C. Dodds (http://kentcdodds.com/)", @@ -22,9 +28,12 @@ "babel-preset-env": "^1.6.1", "babel-preset-react": "^6.24.1", "css-loader": "^0.28.10", + "cypress": "^2.1.0", "file-loader": "^1.1.11", "identity-obj-proxy": "^3.0.0", "jest": "^22.4.2", + "npm-run-all": "^4.1.2", + "serve": "^6.5.3", "style-loader": "^0.20.2", "webpack": "^4.1.1", "webpack-cli": "^2.0.10", diff --git a/other/setup-jest/calculator.solution/src/__tests__/auto-scaling-text.js b/other/configuration/calculator.solution/src/__tests__/auto-scaling-text.js similarity index 100% rename from other/setup-jest/calculator.solution/src/__tests__/auto-scaling-text.js rename to other/configuration/calculator.solution/src/__tests__/auto-scaling-text.js diff --git a/other/setup-jest/calculator.solution/src/__tests__/calculator.js b/other/configuration/calculator.solution/src/__tests__/calculator.js similarity index 100% rename from other/setup-jest/calculator.solution/src/__tests__/calculator.js rename to other/configuration/calculator.solution/src/__tests__/calculator.js diff --git a/other/setup-jest/calculator.solution/src/__tests__/utils.js b/other/configuration/calculator.solution/src/__tests__/utils.js similarity index 100% rename from other/setup-jest/calculator.solution/src/__tests__/utils.js rename to other/configuration/calculator.solution/src/__tests__/utils.js diff --git a/other/setup-jest/calculator.solution/src/auto-scaling-text.js b/other/configuration/calculator.solution/src/auto-scaling-text.js similarity index 100% rename from other/setup-jest/calculator.solution/src/auto-scaling-text.js rename to other/configuration/calculator.solution/src/auto-scaling-text.js diff --git a/other/setup-jest/calculator.solution/src/auto-scaling-text.module.css b/other/configuration/calculator.solution/src/auto-scaling-text.module.css similarity index 100% rename from other/setup-jest/calculator.solution/src/auto-scaling-text.module.css rename to other/configuration/calculator.solution/src/auto-scaling-text.module.css diff --git a/other/setup-jest/calculator.solution/src/calculator-display.js b/other/configuration/calculator.solution/src/calculator-display.js similarity index 100% rename from other/setup-jest/calculator.solution/src/calculator-display.js rename to other/configuration/calculator.solution/src/calculator-display.js diff --git a/other/setup-jest/calculator.solution/src/calculator-display.module.css b/other/configuration/calculator.solution/src/calculator-display.module.css similarity index 100% rename from other/setup-jest/calculator.solution/src/calculator-display.module.css rename to other/configuration/calculator.solution/src/calculator-display.module.css diff --git a/other/setup-jest/calculator.solution/src/calculator.js b/other/configuration/calculator.solution/src/calculator.js similarity index 100% rename from other/setup-jest/calculator.solution/src/calculator.js rename to other/configuration/calculator.solution/src/calculator.js diff --git a/other/setup-jest/calculator.solution/src/calculator.module.css b/other/configuration/calculator.solution/src/calculator.module.css similarity index 100% rename from other/setup-jest/calculator.solution/src/calculator.module.css rename to other/configuration/calculator.solution/src/calculator.module.css diff --git a/other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 b/other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 rename to other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 b/other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 rename to other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 b/other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 rename to other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 b/other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 rename to other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 b/other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 similarity index 100% rename from other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 rename to other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 diff --git a/other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 b/other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 rename to other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 b/other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 rename to other/configuration/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator.solution/src/global.css b/other/configuration/calculator.solution/src/global.css similarity index 100% rename from other/setup-jest/calculator.solution/src/global.css rename to other/configuration/calculator.solution/src/global.css diff --git a/other/setup-jest/calculator.solution/src/index.js b/other/configuration/calculator.solution/src/index.js similarity index 100% rename from other/setup-jest/calculator.solution/src/index.js rename to other/configuration/calculator.solution/src/index.js diff --git a/other/setup-jest/calculator.solution/src/utils.js b/other/configuration/calculator.solution/src/utils.js similarity index 100% rename from other/setup-jest/calculator.solution/src/utils.js rename to other/configuration/calculator.solution/src/utils.js diff --git a/other/setup-jest/calculator.solution/test/setup-test-framework.js b/other/configuration/calculator.solution/test/setup-test-framework.js similarity index 100% rename from other/setup-jest/calculator.solution/test/setup-test-framework.js rename to other/configuration/calculator.solution/test/setup-test-framework.js diff --git a/other/setup-jest/calculator.solution/test/style-mock.js b/other/configuration/calculator.solution/test/style-mock.js similarity index 100% rename from other/setup-jest/calculator.solution/test/style-mock.js rename to other/configuration/calculator.solution/test/style-mock.js diff --git a/other/setup-jest/calculator.solution/webpack.config.js b/other/configuration/calculator.solution/webpack.config.js similarity index 100% rename from other/setup-jest/calculator.solution/webpack.config.js rename to other/configuration/calculator.solution/webpack.config.js diff --git a/other/setup-jest/calculator/.babelrc.js b/other/configuration/calculator/.babelrc.js similarity index 100% rename from other/setup-jest/calculator/.babelrc.js rename to other/configuration/calculator/.babelrc.js diff --git a/other/setup-jest/calculator/index.html b/other/configuration/calculator/index.html similarity index 100% rename from other/setup-jest/calculator/index.html rename to other/configuration/calculator/index.html diff --git a/other/setup-jest/calculator/package.json b/other/configuration/calculator/package.json similarity index 89% rename from other/setup-jest/calculator/package.json rename to other/configuration/calculator/package.json index 62f5e2d1..e83ac997 100644 --- a/other/setup-jest/calculator/package.json +++ b/other/configuration/calculator/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "dev": "webpack-dev-server --mode=development", - "build": "webpack --mode=production" + "build": "webpack --mode=production", + "start": "serve -s dist --port 8080" }, "keywords": [], "author": "Kent C. Dodds (http://kentcdodds.com/)", @@ -19,6 +20,7 @@ "babel-preset-react": "^6.24.1", "css-loader": "^0.28.10", "file-loader": "^1.1.11", + "serve": "^6.5.3", "style-loader": "^0.20.2", "webpack": "^4.1.1", "webpack-cli": "^2.0.10", diff --git a/other/setup-jest/calculator/src/auto-scaling-text.js b/other/configuration/calculator/src/auto-scaling-text.js similarity index 100% rename from other/setup-jest/calculator/src/auto-scaling-text.js rename to other/configuration/calculator/src/auto-scaling-text.js diff --git a/other/setup-jest/calculator/src/auto-scaling-text.module.css b/other/configuration/calculator/src/auto-scaling-text.module.css similarity index 100% rename from other/setup-jest/calculator/src/auto-scaling-text.module.css rename to other/configuration/calculator/src/auto-scaling-text.module.css diff --git a/other/setup-jest/calculator/src/calculator-display.js b/other/configuration/calculator/src/calculator-display.js similarity index 100% rename from other/setup-jest/calculator/src/calculator-display.js rename to other/configuration/calculator/src/calculator-display.js diff --git a/other/setup-jest/calculator/src/calculator-display.module.css b/other/configuration/calculator/src/calculator-display.module.css similarity index 100% rename from other/setup-jest/calculator/src/calculator-display.module.css rename to other/configuration/calculator/src/calculator-display.module.css diff --git a/other/setup-jest/calculator/src/calculator.js b/other/configuration/calculator/src/calculator.js similarity index 100% rename from other/setup-jest/calculator/src/calculator.js rename to other/configuration/calculator/src/calculator.js diff --git a/other/setup-jest/calculator/src/calculator.module.css b/other/configuration/calculator/src/calculator.module.css similarity index 100% rename from other/setup-jest/calculator/src/calculator.module.css rename to other/configuration/calculator/src/calculator.module.css diff --git a/other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 b/other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 rename to other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 b/other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 rename to other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxFIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 b/other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 rename to other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxGIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 b/other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 rename to other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxHIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 b/other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 similarity index 100% rename from other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 rename to other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxIIzIXKMny.woff2 diff --git a/other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 b/other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 rename to other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxLIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 b/other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 similarity index 100% rename from other/setup-jest/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 rename to other/configuration/calculator/src/fonts/KFOkCnqEu92Fr1MmgVxMIzIXKMnyrYk.woff2 diff --git a/other/setup-jest/calculator/src/global.css b/other/configuration/calculator/src/global.css similarity index 100% rename from other/setup-jest/calculator/src/global.css rename to other/configuration/calculator/src/global.css diff --git a/other/setup-jest/calculator/src/index.js b/other/configuration/calculator/src/index.js similarity index 100% rename from other/setup-jest/calculator/src/index.js rename to other/configuration/calculator/src/index.js diff --git a/other/setup-jest/calculator/src/utils.js b/other/configuration/calculator/src/utils.js similarity index 100% rename from other/setup-jest/calculator/src/utils.js rename to other/configuration/calculator/src/utils.js diff --git a/other/setup-jest/calculator/webpack.config.js b/other/configuration/calculator/webpack.config.js similarity index 100% rename from other/setup-jest/calculator/webpack.config.js rename to other/configuration/calculator/webpack.config.js diff --git a/other/jest.config.js b/other/jest.config.js index 2e4edab0..ed83dcaf 100644 --- a/other/jest.config.js +++ b/other/jest.config.js @@ -9,7 +9,7 @@ module.exports = { './client', './server', './other/whats-a-mock', - './other/setup-jest/calculator.solution', + './other/configuration/calculator.solution', './other/jest-expect', ], } diff --git a/other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk (1).woff2 b/other/setup-jest/calculator.solution/src/fonts/KFOkCnqEu92Fr1MmgVxEIzIXKMnyrYk (1).woff2 deleted file mode 100644 index f26d878bae5b0452034e061e735ae2d6dea55e10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 792 zcmV+z1LypAPew8T0RR9100S5R4gdfE00r0p00P7S0RR9100000000000000000000 z0000QCL3@ZHU?k-SP={gf*65#3lIPSHUcCA90VW*f_MiY8?^+;j>I@dafulp5zzb7 z-1k8|@&N(|h`P+Rq0W`N5Rq)bTANpmm)@!?ZV}&esYvRSM67fM&dF;YShS6FU=uA{ z!$3ADRq(dmAX1M_v8OhKOxrK8IuLP8||zD^J+0~!g*2!bF&2_*pm1%0eUCrmoK z1GE09DTCR(k0dZV*4io&ur<+luOWw}_YCsLF zaSs4-vedtn^!~Izgw|^*e%Yo76QUdg%uSwsd5BHxnet*rg-zM}BW;8pfn->ET^kh< zP`3~f7$}eU1!CE{=O!NdD<1yzu{f-}5?01${IdO}OYQ!C z_=!Jyuk8BDi?_5xlH^Zx#)!~d`6liYrg7lA-_N2Nr*(?1<5WAcdr0LaES+5kZKhIE1NXr`<5 z{>tkDvTo7HgO~uyM521)0&+Hq2uU8RV6Z_Wk8GsuKtJB~6R@dHKG=*#el9Ir;MaH> zUBD#Z@N5-59bG3X4rwakG7=wCy=etoGO~)B3)2dh5DPK6$h(#snpYZ|2Js!9Km};o zA$wtZNH4PpG^%Ex)%K0e-&h@&U`@4E)m%5zcF6l&%M0C$H$2j!F>%^tf;U8EA(pl? W$9CI@dafulp5zzb7 z-1k8|@&N(|h`P+Rq0W`N5Rq)bTANpmm)@!?ZV}&esYvRSM67fM&dF;YShS6FU=uA{ z!$3ADRq(dmAX1M_v8OhKOxrK8IuLP8||zD^J+0~!g*2!bF&2_*pm1%0eUCrmoK z1GE09DTCR(k0dZV*4io&ur<+luOWw}_YCsLF zaSs4-vedtn^!~Izgw|^*e%Yo76QUdg%uSwsd5BHxnet*rg-zM}BW;8pfn->ET^kh< zP`3~f7$}eU1!CE{=O!NdD<1yzu{f-}5?01${IdO}OYQ!C z_=!Jyuk8BDi?_5xlH^Zx#)!~d`6liYrg7lA-_N2Nr*(?1<5WAcdr0LaES+5kZKhIE1NXr`<5 z{>tkDvTo7HgO~uyM521)0&+Hq2uU8RV6Z_Wk8GsuKtJB~6R@dHKG=*#el9Ir;MaH> zUBD#Z@N5-59bG3X4rwakG7=wCy=etoGO~)B3)2dh5DPK6$h(#snpYZ|2Js!9Km};o zA$wtZNH4PpG^%Ex)%K0e-&h@&U`@4E)m%5zcF6l&%M0C$H$2j!F>%^tf;U8EA(pl? W$9C { console.log('👍 all dependencies installed')