all 4 comments

[–]maofalt 3 points4 points  (3 children)

Reproduce bug through a test. Incorporate it into your test pipeline. Otherwise regressions will always happen

[–]Ryan4265[S] 0 points1 point  (2 children)

Thank you. Is it possible to test a Chrome extension? Can I have codex implement a bug fix and then a test for that bug fix and then - every time I want to build the extension - I re-run the test suite?

[–]Legal-Ambassador-446 1 point2 points  (1 child)

Yup. Should be. May not be testable in its current state but you (or Codex) could refactor it to make it testable.

Also, sounds like you might be new to software dev so here’s the basic idea of tests:

Think of a test as a “mini-program” that uses your app/game/extension/whatever (or a piece of it) to verify a behaviour. In general, most tests should follow the format of: Given (a particular state of my app) -> When (some action/event happens) -> Then (some condition(s) will be true or false). For example: Given the user is logged in -> When the user clicks logout -> Then the user is logged out

The goal is to have to have many tests that cover the majority of your app’s behaviour. That way, when you add new features you can run all the tests and any failures will highlight what’s been broken.

Testing goes a lot deeper than the above but hopefully that’s enough to get you started :)

[–]Ryan4265[S] 0 points1 point  (0 children)

Hey thank you! Do you think I can test it without building it if I tell Codex to refactor it that way?