Commit f4d0412b authored by Robert Knight's avatar Robert Knight

Remove flag map argument from "flagsChanged" event

This encourages reading of specific flags to be done via `flagEnabled`, which
checks for usage of unknown flags.
parent 928548b0
...@@ -39,7 +39,7 @@ export class FeatureFlags extends TinyEmitter { ...@@ -39,7 +39,7 @@ export class FeatureFlags extends TinyEmitter {
for (let [flag, on] of Object.entries(flags)) { for (let [flag, on] of Object.entries(flags)) {
this._flags.set(flag, on); this._flags.set(flag, on);
} }
this.emit('flagsChanged', this._flags); this.emit('flagsChanged');
} }
/** /**
......
...@@ -32,15 +32,6 @@ describe('FeatureFlags', () => { ...@@ -32,15 +32,6 @@ describe('FeatureFlags', () => {
features.update(testFlags); features.update(testFlags);
assert.calledOnce(onFlagsChanged); assert.calledOnce(onFlagsChanged);
const flagMap = onFlagsChanged.getCall(0).args[0];
assert.instanceOf(flagMap, Map);
assert.deepEqual(
[...flagMap.entries()],
[
['feature_on', true],
['feature_off', false],
]
);
}); });
it('updates flags returned by `flagEnabled`', () => { it('updates flags returned by `flagEnabled`', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment