From 55a040e2cbb23d255a8139fd76fc13d40239d733 Mon Sep 17 00:00:00 2001 From: James Kachel Date: Tue, 14 Jan 2025 07:21:39 -0800 Subject: [PATCH] Removing a bunch of stuff that is unnecessary and/or shouldn't have been committed (#195) - GitHub actions - these were disabled, and are for Heroku releases - Heroku stuff - app.json, Procfile - JS support stuff - jest config, Dockerfile-node - A SQLite database that got generated and committed at some point. (Also updated the gitignore to nerf these too.) --- .github-ex/workflows/production.yml | 34 -- .github-ex/workflows/release-candiate.yml | 34 -- .gitignore | 3 + Dockerfile-node | 12 - Procfile | 5 - app.json | 595 ---------------------- db.sqlite3 | Bin 131072 -> 0 bytes jest-shared-setup.ts | 33 -- jest.config.ts | 19 - jest.jsdom.config.ts | 21 - 10 files changed, 3 insertions(+), 753 deletions(-) delete mode 100644 .github-ex/workflows/production.yml delete mode 100644 .github-ex/workflows/release-candiate.yml delete mode 100644 Dockerfile-node delete mode 100644 Procfile delete mode 100644 app.json delete mode 100644 db.sqlite3 delete mode 100644 jest-shared-setup.ts delete mode 100644 jest.config.ts delete mode 100644 jest.jsdom.config.ts diff --git a/.github-ex/workflows/production.yml b/.github-ex/workflows/production.yml deleted file mode 100644 index b0c431f8..00000000 --- a/.github-ex/workflows/production.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Production Deploy - -on: - workflow_run: - workflows: [CI] - types: [completed] - branches: [release] - workflow_dispatch: # manual trigger - -jobs: - # runs if CI workflow was successful OR if this was manually triggered - on-success: - runs-on: ubuntu-latest - if: > - github.event_name == 'workflow_dispatch' || - github.event.workflow_run.conclusion == 'success' - steps: - - uses: actions/checkout@v2 - with: - ref: release - - uses: akhileshns/heroku-deploy@9fd0f9faae4aa93a38d6f5e25b9128589f1371b0 - with: - heroku_api_key: ${{ secrets.HEROKU_API_KEY }} - heroku_app_name: "odl-open-discussions" - heroku_email: ${{ secrets.HEROKU_EMAIL }} - branch: release - # runs ONLY on a failure of the CI workflow - on-failure: - runs-on: ubuntu-latest - if: > - github.event_name == 'workflow_dispatch' || - github.event.workflow_run.conclusion == 'failure' - steps: - - run: echo 'The triggering workflow failed' diff --git a/.github-ex/workflows/release-candiate.yml b/.github-ex/workflows/release-candiate.yml deleted file mode 100644 index 91c059bd..00000000 --- a/.github-ex/workflows/release-candiate.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Release Candidate Deploy - -on: - workflow_run: - workflows: [CI] - types: [completed] - branches: [release-candidate] - workflow_dispatch: # manual trigger - -jobs: - # runs if CI workflow was successful OR if this was manually triggered - on-success: - runs-on: ubuntu-latest - if: > - github.event_name == 'workflow_dispatch' || - github.event.workflow_run.conclusion == 'success' - steps: - - uses: actions/checkout@v2 - with: - ref: release-candidate - - uses: akhileshns/heroku-deploy@9fd0f9faae4aa93a38d6f5e25b9128589f1371b0 - with: - heroku_api_key: ${{ secrets.HEROKU_API_KEY }} - heroku_app_name: "odl-open-discussions-rc" - heroku_email: ${{ secrets.HEROKU_EMAIL }} - branch: release-candidate - # runs ONLY on a failure of the CI workflow - on-failure: - runs-on: ubuntu-latest - if: > - github.event_name == 'workflow_dispatch' || - github.event.workflow_run.conclusion == 'failure' - steps: - - run: echo 'The triggering workflow failed' diff --git a/.gitignore b/.gitignore index fd7b9fb3..e2c29fc5 100644 --- a/.gitignore +++ b/.gitignore @@ -137,3 +137,6 @@ docker-compose.override.yml # Bulk discount csv generated-codes.csv + +# SQLite +*.sqlite3 diff --git a/Dockerfile-node b/Dockerfile-node deleted file mode 100644 index fcc23e62..00000000 --- a/Dockerfile-node +++ /dev/null @@ -1,12 +0,0 @@ -FROM node:20.17.0 -LABEL maintainer "ODL DevOps " - -RUN apt-get update && apt-get install libelf1 - -USER node - -# Workaround for ownership issues on /src -# Your user in the host system owns this directory anda corresponding user -# with the same uid doesn't exist in the container. This makes git unhappy, -# which also makes commands like `yarn run test-watch` unhappy. -RUN git config --global --add safe.directory /src diff --git a/Procfile b/Procfile deleted file mode 100644 index da39ad60..00000000 --- a/Procfile +++ /dev/null @@ -1,5 +0,0 @@ -release: bash scripts/heroku-release-phase.sh -web: bin/start-nginx bin/start-pgbouncer newrelic-admin run-program uwsgi uwsgi.ini -worker: bin/start-pgbouncer newrelic-admin run-program celery -A unified_ecommerce.celery:app worker -Q default --concurrency=2 -B -l $MITOPEN_LOG_LEVEL -extra_worker_2x: bin/start-pgbouncer newrelic-admin run-program celery -A unified_ecommerce.celery:app worker -Q edx_content,default --concurrency=2 -l $MITOPEN_LOG_LEVEL -extra_worker_performance: bin/start-pgbouncer newrelic-admin run-program celery -A unified_ecommerce.celery:app worker -Q edx_content,default -l $MITOPEN_LOG_LEVEL diff --git a/app.json b/app.json deleted file mode 100644 index 563e70fe..00000000 --- a/app.json +++ /dev/null @@ -1,595 +0,0 @@ -{ - "addons": ["heroku-postgresql:hobby-dev", "newrelic:wayne", "rediscloud:30"], - "buildpacks": [ - { - "url": "https://github.com/heroku/heroku-buildpack-apt" - }, - { - "url": "https://github.com/heroku/heroku-buildpack-nodejs" - }, - { - "url": "https://github.com/moneymeets/python-poetry-buildpack" - }, - { - "url": "https://github.com/heroku/heroku-buildpack-python" - }, - { - "url": "https://github.com/heroku/heroku-buildpack-pgbouncer" - }, - { - "url": "https://github.com/heroku/heroku-buildpack-nginx" - } - ], - "description": "open-discussions", - "env": { - "ALLOWED_HOSTS": { - "description": "", - "required": false - }, - "SITE_NAME": { - "description": "Name of the site.", - "required": false - }, - "AWS_ACCESS_KEY_ID": { - "description": "AWS Access Key for S3 storage.", - "required": false - }, - "AWS_SECRET_ACCESS_KEY": { - "description": "AWS Secret Key for S3 storage.", - "required": false - }, - "AWS_STORAGE_BUCKET_NAME": { - "description": "S3 Bucket name.", - "required": false - }, - "BLOCKLISTED_COURSES_URL": { - "description": "URL of a text file containing blocklisted course ids", - "required": false - }, - "DUPLICATE_COURSES_URL": { - "description": "URL of a text file containing course ids that are duplicates of each other", - "required": false - }, - "BOOTCAMPS_URL": { - "description": "URL to retrieve bootcamps data", - "required": false - }, - "CELERY_WORKER_MAX_MEMORY_PER_CHILD": { - "description": "Max memory to be used by celery worker child", - "required": false - }, - "CLOUDFRONT_DIST": { - "description": "Cloudfront distribution", - "required": false - }, - "CORS_ALLOWED_ORIGINS": { - "description": "A list of origins that are authorized to make cross-site HTTP requests", - "required": false - }, - "DRF_NESTED_PARENT_LOOKUP_PREFIX": { - "description": "DRF extensions parent lookup kwarg name prefix", - "required": false - }, - "CORS_ALLOWED_ORIGIN_REGEXES": { - "description": "A list of regexes that match origins that are authorized to make cross-site HTTP requests", - "required": false - }, - "CSAIL_BASE_URL": { - "description": "CSAIL courses base URL", - "required": false - }, - "EDX_API_ACCESS_TOKEN_URL": { - "description": "URL to retrieve a MITx access token", - "required": false - }, - "EDX_API_URL": { - "description": "URL to retrieve MITx course data from", - "required": false - }, - "EDX_API_CLIENT_ID": { - "description": "EdX client id to access the MITx course catalog API", - "required": false - }, - "EDX_API_CLIENT_SECRET": { - "description": "EdX secret key to access the MITx course catalog API", - "required": false - }, - "EDX_ALT_URL": { - "description": "Base alternate URL for MITx courses hosted on edX", - "required": false - }, - "EDX_BASE_URL": { - "description": "Base default URL for MITx courses hosted on edX", - "required": false - }, - "EDX_LEARNING_COURSE_BUCKET_NAME": { - "description": "Name of the bucket with course run tar archives for MITx", - "required": false - }, - "EDX_LEARNING_COURSE_BUCKET_PREFIX": { - "description": "S3 prefix for MITx bucket keys", - "required": false - }, - "OPENSEARCH_HTTP_AUTH": { - "description": "Basic auth settings for connecting to OpenSearch" - }, - "OPENSEARCH_CONNECTIONS_PER_NODE": { - "description": "The size of the connection pool created for each node detected within an OpenSearch cluster.", - "required": false - }, - "OPENSEARCH_DEFAULT_TIMEOUT": { - "description": "The default timeout in seconds for OpenSearch requests", - "required": false - }, - "OPENSEARCH_INDEX": { - "description": "Index to use on OpenSearch", - "required": true - }, - "OPENSEARCH_MAX_REQUEST_SIZE": { - "description": "Maximum size of JSON data requests sent to OpenSearch", - "required": false - }, - "OPENSEARCH_SHARD_COUNT": { - "description": "Number of shards to allocate when creating an OpenSearch index. Generally set to the CPU count of an individual node in the cluster.", - "required": false - }, - "OPENSEARCH_REPLICA_COUNT": { - "description": "Number of index replicas to create when initializing a new OpenSearch index. Generally set to the number of search nodes available in the cluster.", - "required": false - }, - "OPENSEARCH_INDEXING_CHUNK_SIZE": { - "description": "Chunk size to use for OpenSearch indexing tasks", - "required": false - }, - "OPENSEARCH_DOCUMENT_INDEXING_CHUNK_SIZE": { - "description": "Chunk size to use for OpenSearch course document indexing", - "required": false - }, - "OPENSEARCH_MAX_SUGGEST_HITS": { - "description": "Return suggested search terms only if the number of hits is equal to or below this value", - "required": false - }, - "OPENSEARCH_MAX_SUGGEST_RESULTS": { - "description": "The maximum number of search term suggestions to return", - "required": false - }, - "OPENSEARCH_MIN_QUERY_SIZE": { - "description": "Minimimum number of characters in a query string to search for", - "required": false - }, - "OPENSEARCH_URL": { - "description": "URL for connecting to OpenSearch cluster" - }, - "GA_TRACKING_ID": { - "description": "Google analytics tracking ID", - "required": false - }, - "GA_G_TRACKING_ID": { - "description": "Google analytics GTM tracking ID", - "required": false - }, - "GITHUB_ACCESS_TOKEN": { - "description": "Access token for the Github API", - "required": false - }, - "IMAGEKIT_CACHEFILE_DIR": { - "description": "Prefix path for cached images generated by imagekit", - "required": false - }, - "INDEXING_API_USERNAME": { - "description": "Username used for indexing" - }, - "INDEXING_ERROR_RETRIES": { - "description": "Number of times to retry an indexing operation on failure", - "required": false - }, - "LEARNING_COURSE_ITERATOR_CHUNK_SIZE": { - "description": "Chunk size for iterating over xPRO/MITx Online courses for master json", - "required": false - }, - "MAILGUN_URL": { - "description": "The URL for communicating with Mailgun" - }, - "MAILGUN_KEY": { - "description": "The token for authenticating against the Mailgun API" - }, - "MAILGUN_FROM_EMAIL": { - "description": "Email which mail comes from" - }, - "MAILGUN_BCC_TO_EMAIL": { - "description": "Email address used with bcc email", - "required": false - }, - "MAILGUN_SENDER_DOMAIN": { - "description": "Domain used for emails sent via mailgun" - }, - "MAX_S3_GET_ITERATIONS": { - "description": "Max retry attempts to get an S3 object", - "required": false - }, - "MICROMASTERS_CATALOG_API_URL": { - "description": "URL to MicroMasters catalog API", - "required": "false" - }, - "MITPE_BASE_URL": { - "description": "Base URL for MIT Professional Education website", - "required": "false" - }, - "MITX_ONLINE_BASE_URL": { - "description": "Base default URL for MITx Online courses", - "required": false - }, - "MITX_ONLINE_PROGRAMS_API_URL": { - "description": "The catalog url for MITx Online programs", - "required": false - }, - "MITX_ONLINE_COURSES_API_URL": { - "description": "The api url for MITx Online courses", - "required": false - }, - "MITX_ONLINE_LEARNING_COURSE_BUCKET_NAME": { - "description": "Name of S3 bucket to upload MITx Online course media", - "required": false - }, - "MIT_WS_CERTIFICATE": { - "description": "X509 certificate as a string", - "required": false - }, - "MIT_WS_PRIVATE_KEY": { - "description": "X509 private key as a string", - "required": false - }, - "OCW_BASE_URL": { - "description": "Base URL for OCW courses", - "required": false - }, - "OCW_CONTENT_BUCKET_NAME": { - "description": "Name of S3 bucket containing OCW course data", - "required": false - }, - "OCW_ITERATOR_CHUNK_SIZE": { - "description": "Chunk size for iterating over OCW courses for master json", - "required": false - }, - "OCW_LEARNING_COURSE_BUCKET_NAME": { - "description": "Name of S3 bucket to upload OCW course media", - "required": false - }, - "OCW_NEXT_BASE_URL": { - "description": "Base url for OCW", - "required": false - }, - "OCW_NEXT_SEARCH_WEBHOOK_KEY": { - "description": "Authentication parameter value that should be passed in a webhook", - "required": false - }, - "OCW_UPLOAD_IMAGE_ONLY": { - "description": "Upload course image only instead of all OCW files", - "required": false - }, - "OCW_WEBHOOK_DELAY": { - "description": "Delay in seconds to process an OCW course after receiving webhook", - "required": false - }, - "OCW_WEBHOOK_KEY": { - "description": "Authentication parameter value that should be passed in a webhook", - "required": false - }, - "OLL_ALT_URL": { - "description": "Base alternate URL for OLL courses", - "required": false - }, - "OLL_API_ACCESS_TOKEN_URL": { - "description": "URL to retrieve a OLL access token", - "required": false - }, - "OLL_API_URL": { - "description": "URL to retrieve OLL course data from", - "required": false - }, - "OLL_API_CLIENT_ID": { - "description": "Openedx client id to access the OLL course catalog API", - "required": false - }, - "OLL_API_CLIENT_SECRET": { - "description": "Openedx secret key to access the OLL course catalog API", - "required": false - }, - "OLL_BASE_URL": { - "description": "Base default URL for OLL courses", - "required": false - }, - "MITOPEN_ADMIN_EMAIL": { - "description": "E-mail to send 500 reports to." - }, - "MITOPEN_AUTHENTICATION_PLUGINS": { - "description": "List of pluggy plugins to use for authentication", - "required": false - }, - "MITOPEN_LEARNING_RESOURCES_PLUGINS": { - "description": "List of pluggy plugins to use for learning resources", - "required": false - }, - "MITOPEN_BASE_URL": { - "description": "Base url to link users to in emails" - }, - "MITOPEN_COOKIE_NAME": { - "description": "Name of the cookie for the JWT auth token" - }, - "MITOPEN_COOKIE_DOMAIN": { - "description": "Domain for the cookie for the JWT auth token" - }, - "MITOPEN_DB_CONN_MAX_AGE": { - "value": "0" - }, - "MITOPEN_DB_DISABLE_SSL": { - "value": "True" - }, - "MITOPEN_DB_DISABLE_SS_CURSORS": { - "description": "Disable server-side cursors", - "required": false - }, - "MITOPEN_EMAIL_HOST": { - "description": "Outgoing e-mail settings" - }, - "MITOPEN_EMAIL_PASSWORD": { - "description": "Outgoing e-mail settings" - }, - "MITOPEN_EMAIL_PORT": { - "description": "Outgoing e-mail settings", - "value": "587" - }, - "MITOPEN_EMAIL_TLS": { - "description": "Outgoing e-mail settings", - "value": "True" - }, - "MITOPEN_EMAIL_USER": { - "description": "Outgoing e-mail settings" - }, - "MITOPEN_ENVIRONMENT": { - "description": "The execution environment that the app is in (e.g. dev, staging, prod)" - }, - "MITOPEN_FROM_EMAIL": { - "description": "E-mail to use for the from field" - }, - "MITOPEN_LOG_LEVEL": { - "description": "The log level for the application", - "required": true, - "value": "INFO" - }, - "MITOPEN_JWT_SECRET": { - "description": "Shared secret for JWT auth tokens", - "required": true - }, - "MITOL_MAIL_REPLY_TO_ADDRESS": { - "description": "E-mail to use for reply-to address of emails", - "required": false - }, - "MITOPEN_SECURE_SSL_REDIRECT": { - "description": "Application-level SSL redirect setting.", - "value": "True" - }, - "MITOPEN_SIMILAR_RESOURCES_COUNT": { - "description": "Number of similar resources to return", - "required": false - }, - "MITOPEN_TITLE": { - "description": "Title of the MIT Open site", - "required": false - }, - "MITOPEN_SUPPORT_EMAIL": { - "description": "Email address listed for customer support" - }, - "MITOPEN_UNSUBSCRIBE_TOKEN_MAX_AGE_SECONDS": { - "description": "Maximum age of unsubscribe tokens in seconds", - "required": false - }, - "MITOPEN_USE_S3": { - "description": "Use S3 for storage backend (required on Heroku)", - "value": "False" - }, - "OPEN_PODCAST_DATA_BRANCH": { - "description": "Branch in the open podcast data repository to use for podcast ingestion", - "required": false - }, - "OPEN_RESOURCES_MIN_DOC_FREQ": { - "description": "OpenSearch min_doc_freq value for determining similar resources", - "required": false - }, - "OPEN_RESOURCES_MIN_TERM_FREQ": { - "description": "OpenSearch min_term_freq value for determining similar resources", - "required": false - }, - "OPEN_VIDEO_DATA_BRANCH": { - "description": "Branch in the open video data repository to use for video downloads", - "required": false - }, - "OPEN_VIDEO_MAX_TOPICS": { - "description": "Maximum number of topics to assign a video", - "required": false - }, - "OPEN_VIDEO_MIN_DOC_FREQ": { - "description": "OpenSearch min_doc_freq value for determing video topics", - "required": false - }, - "OPEN_VIDEO_MIN_TERM_FREQ": { - "description": "OpenSearch min_term_freq value for determing video topics", - "required": false - }, - "OPEN_VIDEO_USER_LIST_OWNER": { - "description": "User who will own user lists generated from playlists", - "required": false - }, - "NEW_RELIC_APP_NAME": { - "description": "Application identifier in New Relic." - }, - "NODE_MODULES_CACHE": { - "description": "If false, disables the node_modules cache to fix yarn install", - "value": "false" - }, - "OCW_NEXT_LIVE_BUCKET": { - "description": "bucket for ocw-next courses data", - "required": false - }, - "OCW_NEXT_AWS_STORAGE_BUCKET_NAME": { - "description": "bucket for ocw-next storage data", - "required": false - }, - "PGBOUNCER_DEFAULT_POOL_SIZE": { - "value": "50" - }, - "PGBOUNCER_MIN_POOL_SIZE": { - "value": "5" - }, - "PODCAST_FETCH_SCHEDULE_SECONDS": { - "description": "The time in seconds between periodic syncs of podcasts", - "required": false - }, - "PROLEARN_CATALOG_API_URL": { - "description": "Base URL for the Prolearn search API", - "required": false - }, - "RECAPTCHA_SITE_KEY": { - "description": "Google Recaptcha site key", - "required": false - }, - "RECAPTCHA_SECRET_KEY": { - "description": "Google Recaptcha secret key", - "required": false - }, - "REQUESTS_TIMEOUT": { - "description": "Default timeout for requests", - "required": false - }, - "RSS_FEED_EPISODE_LIMIT": { - "description": "Number of episodes included in aggregated rss feed", - "required": false - }, - "RSS_FEED_CACHE_MINUTES": { - "description": "Minutes that /podcasts/rss_feed will be cached", - "required": false - }, - "SECRET_KEY": { - "description": "Django secret key.", - "generator": "secret" - }, - "SEE_BASE_URL": { - "description": "The base URL for Sloan Executive Education", - "required": false - }, - "SENTRY_DSN": { - "description": "The connection settings for Sentry" - }, - "SENTRY_LOG_LEVEL": { - "description": "The log level for Sentry", - "required": false - }, - "STATUS_TOKEN": { - "description": "Token to access the status API." - }, - "TIKA_CLIENT_ONLY": { - "description": "use tika-python library in client mode", - "required": false - }, - "TIKA_SERVER_ENDPOINT": { - "description": "URL of tika server for extracting text", - "required": false - }, - "TIKA_ACCESS_TOKEN": { - "description": "X-Access-Token value for tika requests", - "required": false - }, - "USE_X_FORWARDED_PORT": { - "description": "Use the X-Forwarded-Port", - "required": false - }, - "USE_X_FORWARDED_HOST": { - "description": "Use the X-Forwarded-Host", - "required": false - }, - "CKEDITOR_ENVIRONMENT_ID": { - "description": "env ID for CKEditor EasyImage auth", - "required": false - }, - "CKEDITOR_SECRET_KEY": { - "description": "secret key for CKEditor EasyImage auth", - "required": false - }, - "CKEDITOR_UPLOAD_URL": { - "description": "upload URL for CKEditor EasyImage", - "required": false - }, - "XPRO_CATALOG_API_URL": { - "description": "The catalog url for xpro programs", - "required": false - }, - "XPRO_COURSES_API_URL": { - "description": "The api url for xpro courses", - "required": false - }, - "XPRO_LEARNING_COURSE_BUCKET_NAME": { - "description": "Name of S3 bucket to upload xPRO course media", - "required": false - }, - "YOUTUBE_DEVELOPER_KEY": { - "description": "The key to the google youtube api", - "required": false - }, - "YOUTUBE_FETCH_SCHEDULE_SECONDS": { - "description": "The time in seconds between periodic syncs of youtube videos", - "required": false - }, - "YOUTUBE_FETCH_TRANSCRIPT_SCHEDULE_SECONDS": { - "description": "The time in seconds between periodic syncs of youtube video transcripts", - "required": false - }, - "YOUTUBE_FETCH_TRANSCRIPT_SLEEP_SECONDS": { - "description": "Sleep time between requests to the youtube transcripts api", - "required": false - }, - "SOCIAL_AUTH_OL_OIDC_OIDC_ENDPOINT": { - "description": "The base URI for OpenID Connect discovery, https:/// without .well-known/openid-configuration.", - "required": false - }, - "SOCIAL_AUTH_OL_OIDC_KEY": { - "description": "The client ID provided by the OpenID Connect provider.", - "required": false - }, - "SOCIAL_AUTH_OL_OIDC_SECRET": { - "description": "The client secret provided by the OpenID Connect provider.", - "required": false - }, - "USERINFO_URL": { - "description": "Provder endpoint where client sends requests for identity claims.", - "required": false - }, - "ACCESS_TOKEN_URL": { - "description": "Provider endpoint where client exchanges the authorization code for tokens.", - "required": false - }, - "AUTHORIZATION_URL": { - "description": "Provider endpoint where the user is asked to authenticate.", - "required": false - }, - "FEATURE_KEYCLOAK_ENABLED": { - "description": "Authentication functionality is managed by Keycloak.", - "required": true - }, - "KEYCLOAK_REALM_NAME": { - "description": "The Keycloak realm name in which Open Discussions has a client configuration.", - "required": true - }, - "KEYCLOAK_BASE_URL": { - "description": "The base URL for a Keycloak configuration.", - "required": true - } - }, - "keywords": ["Django", "Python", "MIT", "Office of Digital Learning"], - "name": "unified_ecommerce", - "repository": "https://github.com/mitodl/mit-open", - "scripts": { - "postdeploy": "./manage.py migrate --noinput" - }, - "success_url": "/", - "website": "https://github.com/mitodl/mit-open" -} diff --git a/db.sqlite3 b/db.sqlite3 deleted file mode 100644 index 9655d0cd4e27f73d41cc2415da141a6338d6e36b..0000000000000000000000000000000000000000 GIT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+A{jpA*+)aKxf3#{%* z(b(P8cWDvTJgcT0%dY3N->cb~J zqsn}B(|+Y)IFENesL-soE_Lo$=QJTjY^`A}YRyI9O_r%F9R-GOE+@V@@ud$6J7 z;XKo`?QG^Mh!e05*By9kCjv@|Ds%I&${4g&t&r8Va?wO|eIBI(Mj4tj z?#H~KfAy%^`zo&{Gg_{gOQ)=h4B^{ZojIdAF4r5b_PzOY$kE>;H${VIdy` zKmY_l00ck)1V8`;KmY_l00f?W0=WNw_S+CO009sH0T2KI5C8!X009sH0T2Lz!wBI1 z|1d(x2LTWO0T2KI5C8!X009sH0T2LzXP*G>|DXLfL=8Xy1V8`;KmY_l00ck)1V8`; zK;SR}xc@(l5b{9)1V8`;KmY_l00ck)1V8`;K;YRY5T+{l+1noWJ@$9(uh51V8`;KmY_l00ck)1V8`;K;Wq$fam|8ie`Wa5C8!X009sH0T2KI5C8!X009tq kq6BdN|3vY^IS7CN2!H?xfB*=900@8p2!H?xJQW1~ADDRd3jhEB diff --git a/jest-shared-setup.ts b/jest-shared-setup.ts deleted file mode 100644 index dfb1f75e..00000000 --- a/jest-shared-setup.ts +++ /dev/null @@ -1,33 +0,0 @@ -import failOnConsole from "jest-fail-on-console" -import "@testing-library/jest-dom" -import { configure } from "@testing-library/react" -import { resetAllWhenMocks } from "jest-when" - -failOnConsole() - -configure({ - /** - * Adapted from https://github.com/testing-library/dom-testing-library/issues/773 - * to make the error messages a bit more succinct. - * - * By default, testing-library prints much too much of the DOM. - * - * This does change the stacktrace a bit: The line causing the error is still - * there, but the line where the error is generated (below) is most visible. - */ - getElementError(message, _container) { - const error = new Error(message ?? "") - error.name = "TestingLibraryElementError" - return error - }, -}) - -afterEach(() => { - /** - * Clear all mock call counts between tests. - * This does NOT clear mock implementations. - * Mock implementations are always cleared between test files. - */ - jest.clearAllMocks() - resetAllWhenMocks() -}) diff --git a/jest.config.ts b/jest.config.ts deleted file mode 100644 index ee07750f..00000000 --- a/jest.config.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Config } from "@jest/types" - -/** - * This configuration is used by root `yarn test` command to aggregate testing - * across local packages. - * - * This is NOT the base configuration used by individual packages. - */ -const projectsConfig: Config.InitialOptions = { - collectCoverage: true, - coverageDirectory: "coverage", - projects: ["/frontends/*/"], - watchPlugins: [ - "jest-watch-typeahead/filename", - "jest-watch-typeahead/testname", - ], -} - -export default projectsConfig diff --git a/jest.jsdom.config.ts b/jest.jsdom.config.ts deleted file mode 100644 index 3dfbd075..00000000 --- a/jest.jsdom.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { resolve } from "path" -import type { Config } from "@jest/types" - -/** - * Base configuration for jest tests. - */ -const config: Config.InitialOptions & - Pick, "setupFilesAfterEnv"> = { - setupFilesAfterEnv: [resolve(__dirname, "./jest-shared-setup.ts")], - testEnvironment: "jsdom", - transform: { - "^.+\\.(t|j)sx?$": "@swc/jest", - }, - moduleNameMapper: { - "\\.svg$": "ol-util/test-utils/svgmock", - "\\.(css|scss)$": "ol-util/test-utils/filemock", - }, - rootDir: "./src", -} - -export default config