TechAndCheck / tech-and-check-alerts

Daily tip sheet for fact checkers
MIT License
13 stars 6 forks source link

Consider breaking test suite code into a standalone npm module #315

Open slifty opened 4 years ago

slifty commented 4 years ago

When testing the CNN scraper utilities we wrote a little script that would generate a slew of tests from a URL and package the inputs / outputs of various steps which could then be invoked as part of a test suite. I'm realizing there might actually be some value in using a similar methodology to test the actual CNN scraper, which means I'm revisiting those scripts and starting to make them more generic.

The functionality here is getting to the point that it might actually be something that could exist as its own developer tool / npm module. The value of this approach is:

  1. It would be usable across other projects.
  2. It would be explicitly isolated from our code / the functionality would be documented on its own without complicating our documentation.
  3. It could be managed and maintained outside of just this project.

Curious what others think.

reefdog commented 4 years ago

I like this idea. The baby steps toward this would be:

  1. Make the code more generic w/in our own project (#316)
  2. Break it out into a private npm module (for testing/developing use as a module but without the time overhead of a publicly-offered module)
  3. Prep it for public use and make it a public module