Skip to content

Commit

Permalink
chore: Clean up ember test logs.
Browse files Browse the repository at this point in the history
The test logs for the ember-cli package are currently very noisy. This
silences the jquery deprecation warning and removes extraneous tests
for lint errors and ember onerror.
  • Loading branch information
Jackson Dean authored and chriseppstein committed Dec 18, 2019
1 parent c189613 commit 67731a9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/@css-blocks/ember-cli/testem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
module.exports = {
test_page: 'tests/index.html?hidepassed',
test_page: 'tests/index.html?hidepassed&nolint',
disable_watching: true,
// only emit logs for failed tests
// https://github.com/testem/testem#tap-options
tap_quiet_logs: true,
launch_in_ci: [
'Chrome'
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { registerDeprecationHandler } from '@ember/debug';

const DEPRECATIONS_TO_SILENCE = {
'ember-views.curly-components.jquery-element': true,
};

function shouldSilenceDeprecationById(deprecationId = '') {
return DEPRECATIONS_TO_SILENCE[deprecationId];
}

export function initialize() {
registerDeprecationHandler((message, options, next) => {
if (options && shouldSilenceDeprecationById(options.id)) {
return;
} else {
next(message, options);
}
});
}

export default { initialize };
6 changes: 5 additions & 1 deletion packages/@css-blocks/ember-cli/tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ import { start } from 'ember-qunit';

setApplication(Application.create(config.APP));

start();
start({
// removes the additional framework onerror tests which are added by default
// https://github.com/emberjs/ember-qunit/blob/master/tests/unit/setup-ember-onerror-validation-test.js
setupEmberOnerrorValidation: false,
});

0 comments on commit 67731a9

Please sign in to comment.