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

Bug: Missing test script in package.json for running yarn test #4856

Open
2 of 3 tasks
Tongxin-Sun opened this issue Nov 21, 2024 · 6 comments · May be fixed by #4879
Open
2 of 3 tasks

Bug: Missing test script in package.json for running yarn test #4856

Tongxin-Sun opened this issue Nov 21, 2024 · 6 comments · May be fixed by #4879
Assignees
Labels
Status: In Progress This issue/PR has ongoing work being done Type: Bug Involves something that isn't working as intended

Comments

@Tongxin-Sun
Copy link
Contributor

Checks

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • The title of this issue follows the Bug: brief description of bug format, e.g. Bug: Lesson complete button does not update on click
  • Would you like to work on this issue?

Bug description

The project's contribution guide specifies that contributors should run yarn test to ensure changes do not cause any failures.
image
However, running yarn test results in the following error:
Usage Error: Couldn't find a script named "test".
$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...

Upon inspecting the package.json file, there is no test script defined under the "scripts" section.
image

How to reproduce

  1. Clone the repository and navigate to the project directory.
  2. Set up the project locally following the guideline.
  3. Run yarn test in the terminal.

Expected behavior

When running yarn test, either:
The command executes a test runner as part of the contribution process, as described in the contribution guide, or
The contribution guide is updated to exclude the yarn test command.

What browsers are you seeing the problem on?

Chrome

What OS are you using?

MacOS

Discord Name

No response

Additional Comments

No response

@Tongxin-Sun Tongxin-Sun added Status: Needs Review This issue/PR needs an initial or additional review Type: Bug Involves something that isn't working as intended labels Nov 21, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog / Ideas in Main Site Nov 21, 2024
@MaoShizhong
Copy link
Contributor

Ah, the wiki was updated to exclude yarn test when React was removed from this repo (since Jest was only used to test the React components) but CONTRIBUTING.md wasn't.

On a related note for the team, when eslint was replaced and the script changed from yarn eslint to yarn lint, CONTRIBUTING.md was updated with the new command but the wiki still states yarn eslint. https://github.com/TheOdinProject/theodinproject/wiki/Contributing-Guide

@KevinMulhern
Copy link
Member

Good spot, thanks @MaoShizhong, I've updated the wiki.

Thanks for reporting @Tongxin-Sun. Removing yarn test from the contributing guide is the fix for this as Mao said. It should be a good fit for a first time contributor.

@KevinMulhern KevinMulhern added Type: Good First Issue Good for beginner contributors Status: Help Wanted This issue can be assigned to other contributors and removed Status: Needs Review This issue/PR needs an initial or additional review labels Nov 25, 2024
@KevinMulhern KevinMulhern moved this from 📋 Backlog / Ideas to 🔖 Ready for Development in Main Site Nov 25, 2024
@itsaflamingo
Copy link

itsaflamingo commented Dec 8, 2024

hi folks! Am I able to work on this issue?

@KevinMulhern KevinMulhern added Status: In Progress This issue/PR has ongoing work being done and removed Type: Good First Issue Good for beginner contributors Status: Help Wanted This issue can be assigned to other contributors labels Dec 10, 2024
@KevinMulhern
Copy link
Member

I've assigned it to you @itsaflamingo, let us know if you need anything.

@KevinMulhern KevinMulhern moved this from 🔖 Ready for Development to 🏗 In progress in Main Site Dec 10, 2024
@itsaflamingo
Copy link

@KevinMulhern sounds good thanks:)

@itsaflamingo itsaflamingo linked a pull request Dec 11, 2024 that will close this issue
7 tasks
@itsaflamingo
Copy link

@KevinMulhern PR is sent, here's the link :) #4879

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress This issue/PR has ongoing work being done Type: Bug Involves something that isn't working as intended
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

4 participants