mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
🚫 hide ds.errors related warnings that fill the test logs (#623)
no issue - our custom validation engine makes extensive use of `DS.Errors` which fills the console and especially the test logs with a ton of warnings, this change adds a handler to skip the warnings that we don't care about at the moment - should be removed when we merge the validations refactor
This commit is contained in:
parent
088fbb4eb7
commit
1a093d5324
1 changed files with 16 additions and 0 deletions
|
@ -22,6 +22,22 @@ let App = Application.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: remove once the validations refactor is complete
|
||||||
|
// eslint-disable-next-line
|
||||||
|
Ember.Debug.registerWarnHandler((message, options, next) => {
|
||||||
|
let skip = [
|
||||||
|
'ds.errors.add',
|
||||||
|
'ds.errors.remove',
|
||||||
|
'ds.errors.clear'
|
||||||
|
];
|
||||||
|
|
||||||
|
if (skip.includes(options.id)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
next(message, options);
|
||||||
|
});
|
||||||
|
|
||||||
loadInitializers(App, config.modulePrefix);
|
loadInitializers(App, config.modulePrefix);
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
|
Loading…
Add table
Reference in a new issue