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

Reload Tape #7

Merged
merged 2 commits into from
Jun 19, 2018
Merged

Reload Tape #7

merged 2 commits into from
Jun 19, 2018

Conversation

yosimasu
Copy link
Contributor

  1. Add options.reload
  2. If options.reload = true, reload the tape

@mbaertschi
I can not write a test case for this, because of Jest issue.

1. Add options.reload
2. If options.reload = true, reload the tape
@mbaertschi
Copy link
Owner

Hi @yosimasu

I would be great to have two options:

  1. options.refresh = true refreshes the tape content (but does not delete it beforehand)
  2. options.reload = true deletes the tape and reloads it

what do you think about this?

@yosimasu
Copy link
Contributor Author

yosimasu commented Jun 19, 2018

Hi, @mbaertschi ,

  1. options.refresh = true
    I will change the original options.reload to options.refresh of PR.

  2. options.reload = true
    Delete a tape and reload it every time? It will be like connecting the proxy target directly. I am not sure the option is needed.

Change `reload` to `refresh`
@mbaertschi
Copy link
Owner

Hi @yosimasu

This looks good. Thank you four your contribution, I really appreciate it!

I will add option.reload in a later stage myself. This would be helpful in the test-writing-stage where one might has to delete and re-add the recorded test-files multiple times. This happens to me from time to time :-)

@mbaertschi mbaertschi merged commit 49b0377 into mbaertschi:master Jun 19, 2018
@yosimasu yosimasu deleted the issues/reload branch June 20, 2018 02:20
@yosimasu
Copy link
Contributor Author

@mbaertschi

I think the reload option is a great idea.
I want to add an enhancement:

  1. add reloadStatues option, if reloadStatuses is undefined or empty, reload always.
  2. if match, reload it,
  3. if no match, use existed tape instead

@mbaertschi
Copy link
Owner

Hi @yosimasu

Feel free to add this extension. Please be aware of the existing option.relaod configuration which simply deletes the file in the index.js source.

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.

None yet

2 participants