-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
This would be expected to pass:
describe('when dealing with nested objects', function() {
it('should not throw if registered field is changed', function() {
const config = {
nested: {
foo: {
pleaseChangeMe: 'pleaseChangeMe'
}
}
};
const snapshot = bedrock._snapshotOverrideFields({
config,
fields: [
'nested'
]
});
// change fields
config.nested.foo.pleaseChangeMe = 'changed';
const fn = bedrock._ensureConfigOverride.bind(this, {
config,
configOverrideSnapshot: snapshot
});
expect(fn).to.not.throw();
});
});However:
1 failing
1) bedrock
_ensureConfigOverride
when dealing with nested objects
should not throw if registered field is changed:
AssertionError: expected [Function bound _ensureConfigOverride] to not throw an error but 'Error: The config field "nested" must…' was thrown
Config values are set in the map directly, but if parent path values are added to fields to watch then they will not be detected as properly changed. Exact desired behavior here when registering root paths needs to be decided
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels