Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uruchamianie testów na wybrany dzień #40

Open
przeprogramowani opened this issue Dec 21, 2023 · 2 comments
Open

Uruchamianie testów na wybrany dzień #40

przeprogramowani opened this issue Dec 21, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@przeprogramowani
Copy link
Owner

przeprogramowani commented Dec 21, 2023

W niedzielę kończymy pierwszą edycję naszego wydarzenia (wow!)

W związku z tym pojawi się problem - polecenie npm run test nie będzie odnajdywało testów z dat dalszych, niż 24 grudnia.

Chciałbym zaproponować szansę na kontrybucję:

  1. wprowadzenie wsparcia dla argumentów (np. day) dzięki czemu polecenie npm run test 22 wykona testy z folderu 2023-12-22.
  2. zmiana domyślnego zachowania polecenia npm run test na uruchamianie wszystkich testów w projekcie zamiast testów z "dzisiejszej" daty
  3. ładny error handling, tak żeby wspierane były argumenty z zakresu 1-24 i nic więcej

Z góry dzięki dla zainteresowanych pomocą!

@przeprogramowani przeprogramowani added the help wanted Extra attention is needed label Dec 21, 2023
artur1989 added a commit to artur1989/advent-of-frontend that referenced this issue Dec 25, 2023
Changes:
* Added the option to run tests for a particular day. You can use a date like "YYYY-MM-DD", a number from 1 to 24, or run all tests if no specific argument is given.
artur1989 added a commit to artur1989/advent-of-frontend that referenced this issue Dec 25, 2023
Changes:
* Added the option to run tests for a particular day. You can use a date like "YYYY-MM-DD", a number from 1 to 24, or run all tests if no specific argument is given.
artur1989 added a commit to artur1989/advent-of-frontend that referenced this issue Dec 25, 2023
Changes:
* Added the option to run tests for a particular day. You can use a date like "YYYY-MM-DD", a number from 1 to 24, or run all tests if no specific argument is given.
artur1989 added a commit to artur1989/advent-of-frontend that referenced this issue Dec 25, 2023
Changes:
* Added the option to run tests for a particular day. You can use a date like "YYYY-MM-DD", a number from 1 to 24, or run all tests if no specific argument is given.
* Removed "test:all" script
@artur1989
Copy link

artur1989 commented Dec 25, 2023

Wprowadzone zmiany:

  • Dodana możliwość uruchomienia testów na konkretny dzień. Można użyć daty w formacie "YYYY-MM-DD", liczby całkowitej w zakresie od 1 do 24 lub uruchomić wszystkie testy, jeśli nie podano konkretnego argumentu.
  • Usunięty został skrypt "test:all", który nie jest dłużej wymagany w związku ze zmianą domyślnego zachowania skryptu "npm test"
  • Dodany został opis wykorzystania polecenia "npm test" w pliku README.md

W przypadku podania jako argumentu dnia, szukany jest folder najbliższy bieżącej dacie. Dla przykładu, jeśli użyjemy polecenia "npm test 6", a będą istnieć foldery nazwane "2023-12-06" i "2024-12-06", a obecna data to "2024-12-24", wybrany zostanie folder z datą "2024-12-06". Zmiana ta pozwali na obsługę testów w przyszłych edycjach Advent of Frontend.

artur1989 added a commit to artur1989/advent-of-frontend that referenced this issue Dec 25, 2023
Changes:
* Updated the search logic when only a day is provided. Now, it looks for the latest folder with the date closest to the current one and matching the given day. For example, if we run npm test 6, and there are folders with dates 2023-12-06 and 2024-12-06, while the current date is 2024-12-24, it will select the folder with the date 2024-12-06. This change is made to support future editions of Advent of Frontend.
artur1989 added a commit to artur1989/advent-of-frontend that referenced this issue Dec 25, 2023
Changes:
* Updated the search logic when only a day is provided. Now, it looks for the latest folder with the date closest to the current one and matching the given day. For example, if we run npm test 6, and there are folders with dates 2023-12-06 and 2024-12-06, while the current date is 2024-12-24, it will select the folder with the date 2024-12-06. This change is made to support future editions of Advent of Frontend.
artur1989 added a commit to artur1989/advent-of-frontend that referenced this issue Dec 25, 2023
artur1989 added a commit to artur1989/advent-of-frontend that referenced this issue Dec 28, 2023
Changes:
* Moved validation functions isValidDate and isNumeric to the utilities module
* Changed file extension from .cjs to .mjs due to ECMAScript modules usage
* The getTestFilePath function, which returns the full path to the test file is public
* Refactored function names
@przeprogramowani
Copy link
Owner Author

Dzięki! Wracamy po świętach, będzie feedback tak szybko, jak to możliwe. /P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants