Skip to content

Move lib/*.js files used only in tests to tests/lib (or something) #143

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

Closed
JasonEtco opened this issue Sep 24, 2020 · 4 comments
Closed
Labels
engineering Will involve Docs Engineering stale There is no recent activity on this issue or pull request

Comments

@JasonEtco
Copy link
Contributor

While reviewing github/docs-internal#15734, I had a difficult time grokking which code was used during runtime vs. only in tests/local scripts. I've thought that a couple of times - we don't currently have a clear separation of that code. Generally speaking, lib is used for runtime code - stuff to run the server. Code solely used for tests often lives in like a tests/helpers directory or something.

Interested in how y'all feel @github/docs-engineering, if this is just me or if others have felt this confusion as well.

@zeke
Copy link
Contributor

zeke commented Sep 24, 2020

Keeping test utils in their own directory in /tests/something sounds good to me.

Do you have any examples of this?

@sarahs
Copy link
Contributor

sarahs commented Sep 24, 2020

The two I can think of are lib/check-images.js and lib/check-links.js. I agree those can live in the test dir. 👍

There is also lib/remove-liquid-statements.js, which we don't use in runtime code, but we use it in scripts as well as tests. So lib seems OK for that one since it's used in multiple places.

Are there others you noticed, @JasonEtco?

@zeke zeke transferred this issue from another repository Oct 6, 2020
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 6, 2020
@zeke zeke added engineering Will involve Docs Engineering and removed triage Do not begin working on this issue until triaged by the team labels Oct 6, 2020
@JamesMGreene
Copy link
Member

NOTE: With this, we should also review which of are Node dependencies are actually devDependencies that should be moved in the package.json.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Will involve Docs Engineering stale There is no recent activity on this issue or pull request
Projects
None yet
Development

No branches or pull requests

4 participants