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

Improve testability #105

Merged
merged 4 commits into from
Feb 27, 2019
Merged

Improve testability #105

merged 4 commits into from
Feb 27, 2019

Conversation

singingknight
Copy link
Contributor

Allow test for files in scripts folder

Make yarn start:

  • test specification for changed file
  • reprocess failed files on new update

Allow test for files in scripts folder

Make `yarn start`:
- test specification for changed file
- reprocess failed files on new update
Copy link
Contributor

@kasperisager kasperisager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestions! As for introducing tests for the build scripts, there's of course a bit a chicken/egg situation going on: Tests are written using @siteimprove/alfa-test which requires the build system to build. As such, the build system cannot make use of this package, nor can the build system even contain TypeScript files. What I'd much rather have us do is introduce inline assertions in the build system in lieu of separate tests.

*
* @type {Array<string>}
*/
let failed = [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I do see the point of introducing something like this, I'm also a bit concerned of the impact it will have. I for one would very much dislike having my feedback stream littered with errors I already know exist because I've seen them previously. If I make a change to file A and compilation fails because I also need to change something in file B, I don't want to be reminded that file A fails every time I write to file B. Once I'm finished with file B I'll head back and check for myself if file A still fails. In the event that I forgot to do so and it still fails, CI will remind me in the worst case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, I'd actually love to be reminded about file A, I just don't want to see a bunch of errors unrelated to file B if that's the file I'm writing to.

Copy link
Contributor

@kasperisager kasperisager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@kasperisager kasperisager merged commit e7825e8 into master Feb 27, 2019
@kasperisager kasperisager deleted the improve-testability branch February 27, 2019 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants