Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Record new tests without re-recording old ones #48

Open
SimplGy opened this issue Feb 3, 2014 · 4 comments
Open

Record new tests without re-recording old ones #48

SimplGy opened this issue Feb 3, 2014 · 4 comments

Comments

@SimplGy
Copy link

SimplGy commented Feb 3, 2014

Is there a way to record a new test without re-recording old ones?

If I add a test to Huxleyfile.json, it seems like I have to re-record all of the tests.

I have been working around this by:

  • duplicating the existing test folders
  • hux -r
  • press enter to skip tests I've already recorded
  • record the new test(s)
  • delete the folders for tests I skipped
  • replacing the folders for tests that were already recorded

Is there a huxlified way to do this?

@chenglou
Copy link
Contributor

chenglou commented Feb 9, 2014

Cross-posting from chenglou/node-huxley#30
The node version has a jasmine-like xname option to temporarily disable some tests. I'm also considering dropping it and opt instead for >name instead, which allows you to run a single test.

@SimplGy
Copy link
Author

SimplGy commented Feb 10, 2014

Below is the part I didn't know. Seems like the best setup would use one huxleyfile per component, and glob them all into one update run. Then you could record one ui component at a time, which is the common case. Thanks for referencing #30!

Maybe I should make this stand out more in hux -h, but you pass the folders containing the huxleyfiles, aka without the /Huxleyfile.json part.
Btw, you can also use globs. And multiple globs =). Huxley will dedupe the paths correctly.

@chenglou
Copy link
Contributor

You're welcome =). It's written in the best practices here.

@SimplGy
Copy link
Author

SimplGy commented Feb 10, 2014

The docs recommend dedicated urls and single component testing. It would be clearer to describe that you can (and should) have multiple huxleyfiles, in that same section, otherwise you run into issue #48 :)

The documentation section you referenced (sumarized):

  • Create a dedicated test URL for Huxley to hit that uses mocking.
  • Test a small unit of functionality.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants