├── .all-contributorsrc ├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ └── validate.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── LIVE_INSTRUCTIONS.md ├── README.md ├── dev.js ├── index.js ├── jest.config.js ├── jsconfig.json ├── package.json ├── sandbox.config.json ├── scripts ├── autofill-feedback-email.js ├── codesandbox-page.js └── setup.js ├── setup.js ├── src ├── __tests__ │ ├── auth.exercise.js │ ├── auth.final.extra-1.js │ ├── auth.final.extra-2.js │ ├── auth.final.extra-3.js │ ├── auth.final.extra-4.js │ ├── auth.final.js │ ├── auth.md │ ├── list-items.exercise.js │ ├── list-items.final.extra-1.js │ ├── list-items.final.js │ └── list-items.md ├── db │ ├── README.md │ ├── books.js │ ├── list-items.js │ ├── users.js │ └── utils.js ├── index.js ├── routes │ ├── __tests__ │ │ ├── list-items-controller.exercise.js │ │ ├── list-items-controller.final.extra-1.js │ │ ├── list-items-controller.final.extra-2.js │ │ ├── list-items-controller.final.js │ │ └── list-items-controller.md │ ├── auth-controller.js │ ├── auth.js │ ├── index.js │ ├── list-items-controller.js │ └── list-items.js ├── start.js └── utils │ ├── __tests__ │ ├── auth.exercise.js │ ├── auth.final.extra-1.js │ ├── auth.final.extra-2.js │ ├── auth.final.extra-3.js │ ├── auth.final.js │ ├── auth.md │ ├── error-middleware.exercise.js │ ├── error-middleware.final.extra-1.js │ ├── error-middleware.final.extra-2.js │ ├── error-middleware.final.js │ └── error-middleware.md │ ├── auth.js │ └── error-middleware.js └── test ├── jest.config.exercises.js ├── jest.config.final.js ├── jest.config.projects.js ├── setup-env.js └── utils ├── async.js ├── db-utils.js └── generate.js /.all-contributorsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/.all-contributorsrc -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | build 4 | scripts/setup.js 5 | dist 6 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.github/workflows/validate.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/.github/workflows/validate.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/.npmrc -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/.prettierignore -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/.prettierrc -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/LICENSE.md -------------------------------------------------------------------------------- /LIVE_INSTRUCTIONS.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/LIVE_INSTRUCTIONS.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/README.md -------------------------------------------------------------------------------- /dev.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/dev.js -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/index.js -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./test/jest.config.projects') 2 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/jsconfig.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/package.json -------------------------------------------------------------------------------- /sandbox.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "template": "node" 3 | } 4 | -------------------------------------------------------------------------------- /scripts/autofill-feedback-email.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/scripts/autofill-feedback-email.js -------------------------------------------------------------------------------- /scripts/codesandbox-page.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/scripts/codesandbox-page.js -------------------------------------------------------------------------------- /scripts/setup.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/scripts/setup.js -------------------------------------------------------------------------------- /setup.js: -------------------------------------------------------------------------------- 1 | require('./scripts/setup') 2 | -------------------------------------------------------------------------------- /src/__tests__/auth.exercise.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/auth.exercise.js -------------------------------------------------------------------------------- /src/__tests__/auth.final.extra-1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/auth.final.extra-1.js -------------------------------------------------------------------------------- /src/__tests__/auth.final.extra-2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/auth.final.extra-2.js -------------------------------------------------------------------------------- /src/__tests__/auth.final.extra-3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/auth.final.extra-3.js -------------------------------------------------------------------------------- /src/__tests__/auth.final.extra-4.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/auth.final.extra-4.js -------------------------------------------------------------------------------- /src/__tests__/auth.final.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/auth.final.js -------------------------------------------------------------------------------- /src/__tests__/auth.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/auth.md -------------------------------------------------------------------------------- /src/__tests__/list-items.exercise.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/list-items.exercise.js -------------------------------------------------------------------------------- /src/__tests__/list-items.final.extra-1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/list-items.final.extra-1.js -------------------------------------------------------------------------------- /src/__tests__/list-items.final.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/list-items.final.js -------------------------------------------------------------------------------- /src/__tests__/list-items.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/__tests__/list-items.md -------------------------------------------------------------------------------- /src/db/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/db/README.md -------------------------------------------------------------------------------- /src/db/books.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/db/books.js -------------------------------------------------------------------------------- /src/db/list-items.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/db/list-items.js -------------------------------------------------------------------------------- /src/db/users.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/db/users.js -------------------------------------------------------------------------------- /src/db/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/db/utils.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/index.js -------------------------------------------------------------------------------- /src/routes/__tests__/list-items-controller.exercise.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/__tests__/list-items-controller.exercise.js -------------------------------------------------------------------------------- /src/routes/__tests__/list-items-controller.final.extra-1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/__tests__/list-items-controller.final.extra-1.js -------------------------------------------------------------------------------- /src/routes/__tests__/list-items-controller.final.extra-2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/__tests__/list-items-controller.final.extra-2.js -------------------------------------------------------------------------------- /src/routes/__tests__/list-items-controller.final.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/__tests__/list-items-controller.final.js -------------------------------------------------------------------------------- /src/routes/__tests__/list-items-controller.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/__tests__/list-items-controller.md -------------------------------------------------------------------------------- /src/routes/auth-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/auth-controller.js -------------------------------------------------------------------------------- /src/routes/auth.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/auth.js -------------------------------------------------------------------------------- /src/routes/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/index.js -------------------------------------------------------------------------------- /src/routes/list-items-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/list-items-controller.js -------------------------------------------------------------------------------- /src/routes/list-items.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/routes/list-items.js -------------------------------------------------------------------------------- /src/start.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/start.js -------------------------------------------------------------------------------- /src/utils/__tests__/auth.exercise.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/auth.exercise.js -------------------------------------------------------------------------------- /src/utils/__tests__/auth.final.extra-1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/auth.final.extra-1.js -------------------------------------------------------------------------------- /src/utils/__tests__/auth.final.extra-2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/auth.final.extra-2.js -------------------------------------------------------------------------------- /src/utils/__tests__/auth.final.extra-3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/auth.final.extra-3.js -------------------------------------------------------------------------------- /src/utils/__tests__/auth.final.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/auth.final.js -------------------------------------------------------------------------------- /src/utils/__tests__/auth.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/auth.md -------------------------------------------------------------------------------- /src/utils/__tests__/error-middleware.exercise.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/error-middleware.exercise.js -------------------------------------------------------------------------------- /src/utils/__tests__/error-middleware.final.extra-1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/error-middleware.final.extra-1.js -------------------------------------------------------------------------------- /src/utils/__tests__/error-middleware.final.extra-2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/error-middleware.final.extra-2.js -------------------------------------------------------------------------------- /src/utils/__tests__/error-middleware.final.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/error-middleware.final.js -------------------------------------------------------------------------------- /src/utils/__tests__/error-middleware.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/__tests__/error-middleware.md -------------------------------------------------------------------------------- /src/utils/auth.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/auth.js -------------------------------------------------------------------------------- /src/utils/error-middleware.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/src/utils/error-middleware.js -------------------------------------------------------------------------------- /test/jest.config.exercises.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/test/jest.config.exercises.js -------------------------------------------------------------------------------- /test/jest.config.final.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/test/jest.config.final.js -------------------------------------------------------------------------------- /test/jest.config.projects.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/test/jest.config.projects.js -------------------------------------------------------------------------------- /test/setup-env.js: -------------------------------------------------------------------------------- 1 | process.env.PORT = 0 2 | -------------------------------------------------------------------------------- /test/utils/async.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/test/utils/async.js -------------------------------------------------------------------------------- /test/utils/db-utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/test/utils/db-utils.js -------------------------------------------------------------------------------- /test/utils/generate.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentcdodds/testing-node-apps/HEAD/test/utils/generate.js --------------------------------------------------------------------------------