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

add vitest, add json validation tests, fix broken json files #566

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

havardthom
Copy link
Contributor

@havardthom havardthom commented Nov 28, 2024

Note

We are meticulous when it comes to merging code into the main branch, so please understand that we may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged.

Description

  • Add vitest and React Testing Library to frontend
  • Implement json validation tests
    • test valid json syntax
    • test valid schema
    • test that script file exist for each install method in json
  • Fix broken json files
    • Change interface_port, hdd, cpu and ram from string to number
    • Some other small bugs
  • Change OS version in schema from number to string

Will add linting and testing to Github action later which will be used to validate PR's

Type of change

Please check the relevant option(s):

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts.)

Prerequisites

The following efforts must be made for the PR to be considered. Please check when completed:

  • Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
  • Testing performed (I have tested my changes, ensuring everything works as expected)
  • Documentation updated (I have updated any relevant documentation)

Additional Information (optional)

Provide any additional context or screenshots about the feature or fix here.

green

example broken json:
invalid-json

example broken schema:
invalid-schema

Related Pull Requests / Discussions

If there are other pull requests or discussions related to this change, please link them here:

  • Related PR #

@havardthom havardthom requested review from a team as code owners November 28, 2024 12:00
@github-actions github-actions bot added update script A change that updates a script website A change to the website labels Nov 28, 2024
@havardthom
Copy link
Contributor Author

Json files removed because they don't have scripts:

collabora-online.json
collabora.json
scrutiny.json

@havardthom
Copy link
Contributor Author

Fixed json files with bug in install_method.script path
kimai.json
nextpvr.json

@MickLesk
Copy link
Member

json editor is also customized? So that it is no longer hdd=“2”, instead hdd=2 ?

@havardthom
Copy link
Contributor Author

json editor is also customized? So that it is no longer hdd=“2”, instead hdd=2 ?

json editor already used number for these fields, only the json files was not following the schema

@BramSuurdje
Copy link
Collaborator

LGTM! good addition

@MickLesk MickLesk merged commit 03be08b into community-scripts:main Nov 28, 2024
3 checks passed
@MickLesk MickLesk removed the update script A change that updates a script label Nov 28, 2024
@MickLesk MickLesk changed the title Add vitest, add json validation tests, fix broken json files ddd vitest, add json validation tests, fix broken json files Nov 28, 2024
@MickLesk MickLesk changed the title ddd vitest, add json validation tests, fix broken json files add vitest, add json validation tests, fix broken json files Nov 28, 2024
@github-actions github-actions bot added the update script A change that updates a script label Nov 28, 2024
@MickLesk MickLesk removed the update script A change that updates a script label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
website A change to the website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants