diff --git a/.env.test b/.env.test new file mode 100644 index 000000000..b8844c7f7 --- /dev/null +++ b/.env.test @@ -0,0 +1 @@ +REACT_APP_YOUTUBE_KEY=AIzaSyDFnO9VgkkdOBvHDq4NtEStIng-fAkEkEY \ No newline at end of file diff --git a/.eslintrc b/.eslintrc index ba178545c..e5e605cd2 100644 --- a/.eslintrc +++ b/.eslintrc @@ -3,7 +3,7 @@ "plugins": ["prettier"], "rules": { "prettier/prettier": "error", - "react/jsx-filename-extension": "error", + "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], "react-hooks/exhaustive-deps": "warn", "import/no-unresolved": ["off", { "ignore": [".css$"] }], "import/prefer-default-export": "off", diff --git a/.gitignore b/.gitignore index 4d29575de..de3f630aa 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,9 @@ # misc .DS_Store .env.local +.env.development .env.development.local +.env.test .env.test.local .env.production.local diff --git a/package.json b/package.json index 5bc0e0d0d..7ee5f5007 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,20 @@ "version": "0.1.0", "private": true, "dependencies": { + "@testing-library/dom": "^7.29.6", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^10.4.9", + "@testing-library/react-hooks": "^5.1.0", "@testing-library/user-event": "^12.1.3", + "debounce": "^1.2.0", + "jest-styled-components": "6.0.0", "react": "^16.13.1", "react-dom": "^16.13.1", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", - "react-scripts": "3.4.3" + "react-scripts": "3.4.3", + "react-test-renderer": "^17.0.1", + "styled-components": "4.4.1" }, "scripts": { "start": "react-scripts start", @@ -21,6 +27,7 @@ "lint:fix": "eslint ./src --ext .js,.jsx --fix" }, "devDependencies": { + "@sheerun/mutationobserver-shim": "^0.3.3", "eslint-config-airbnb": "^18.2.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-eslint-comments": "^3.2.0", @@ -57,5 +64,12 @@ "hooks": { "pre-commit": "lint-staged" } + }, + "jest": { + "coveragePathIgnorePatterns": [ + "src/utils/testing/helpers", + "src/utils/index.js", + "src/index.js" + ] } } diff --git a/public/index.html b/public/index.html index 6a9f8c26b..4c86c1ef1 100644 --- a/public/index.html +++ b/public/index.html @@ -7,6 +7,12 @@ + + + +