From 1a093d5324dd36b158731403f192868ffabd9b63 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 5 Apr 2017 18:21:33 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=AB=20hide=20ds.errors=20related=20war?= =?UTF-8?q?nings=20that=20fill=20the=20test=20logs=20(#623)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ghost/admin/app/app.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ghost/admin/app/app.js b/ghost/admin/app/app.js index 83d7ac8493..8b0c9e7d1b 100755 --- a/ghost/admin/app/app.js +++ b/ghost/admin/app/app.js @@ -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); export default App;