Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

Configuration options for angular integration #16

Open
jperl opened this issue Mar 26, 2013 · 5 comments
Open

Configuration options for angular integration #16

jperl opened this issue Mar 26, 2013 · 5 comments

Comments

@jperl
Copy link
Contributor

jperl commented Mar 26, 2013

Right now I have this line commented out because the application already uses angular.mock.e2e.$httpBackendDecorator and the mocks get overridden if I leave it there.

It would be a nice to be able to pass configuration options to features.

@tbosch
Copy link
Contributor

tbosch commented Apr 2, 2013

Yes,
good idea. What do you think about the following:

  • boolean features: Just as today, just use feature('someFeature') to enable it
  • features with config: Use an object hash, e.g. feature({name: 'someComplexFeature', configProp1: 1, ...}

By this, we can still pass multiple features to one call of feature.

Tobias

@jperl
Copy link
Contributor Author

jperl commented Apr 2, 2013

I like that a lot

@jperl
Copy link
Contributor Author

jperl commented Apr 2, 2013

What about instead: feature(name, [config]). Config would be an optional parameter so you could call

  • boolean features: feature('someFeature')
  • features with config: feature('someFeature', { configProp1: 1, ... })

That way you do not need to pollute the config with a name property and you can call it the same way as now.

@tbosch
Copy link
Contributor

tbosch commented Apr 2, 2013

Yes, true.
However, right now, feature accepts a list of features, e.g. feature('xhrSensor', 'timeoutSensor', ...). To keep this property, the object notation would be better...
Mmmh..

Tobais

@jperl
Copy link
Contributor Author

jperl commented Apr 2, 2013

Got it that makes a lot of sense. I agree with feature({name: 'someComplexFeature', configProp1: 1, ...}

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