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

Setup configuration / Make tests pass #4

Closed
inakianduaga opened this issue Nov 12, 2014 · 1 comment
Closed

Setup configuration / Make tests pass #4

inakianduaga opened this issue Nov 12, 2014 · 1 comment

Comments

@inakianduaga
Copy link
Owner

We need to remove the mocked dashboard variable and mock the constant (if possible), using provider , or otherwise just actually defining the constant, and removing the constant from the actual base code (or check to see if constant can be modified after the fact and code pays attention to it)

Update: We can first try by simply redefining the constant for the module using

module('angular-remote-logger')
  .constant('EXCEPTION_LOGGER_CONFIG', {NEW_OBJECT_WITH_VALUES})

which would be what a regular user would do for configuring the module

@inakianduaga inakianduaga changed the title Make tests pass Setup configuration / Make tests pass Nov 13, 2014
@inakianduaga
Copy link
Owner Author

Update:

We are having problems being able to override the constant for the configuration, even using the separate service. If we can't get it to work like this, the alternative would be to define a separate module which has only the constants (so something like angular-remote-logger.constants, and inject that module into the angular-remote-logger module as a dependency. Then we can override the entire module with the new constant definitions and it should work.

Update2:

Overriding the constant now seems to work, problem is that the xhrInterceptor doesn't seem to reflect the new values, seems they are burned in instead of keeping the reference

Update3:

Configuration is now used by reference, some xhrInterceptor tests still failing

Update4:

Get rid of the angularRemoteLoggerConfigurator since we can easily modify the configuration directly by changing the constant object, like ui-bootstrap datepicker does for example

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

No branches or pull requests

1 participant