Skip to content

Commit 67731a9

Browse files
Jackson Deanchriseppstein
authored andcommitted
chore: Clean up ember test logs.
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.
1 parent c189613 commit 67731a9

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

packages/@css-blocks/ember-cli/testem.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module.exports = {
2-
test_page: 'tests/index.html?hidepassed',
2+
test_page: 'tests/index.html?hidepassed&nolint',
33
disable_watching: true,
4+
// only emit logs for failed tests
5+
// https://github.com/testem/testem#tap-options
6+
tap_quiet_logs: true,
47
launch_in_ci: [
58
'Chrome'
69
],
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { registerDeprecationHandler } from '@ember/debug';
2+
3+
const DEPRECATIONS_TO_SILENCE = {
4+
'ember-views.curly-components.jquery-element': true,
5+
};
6+
7+
function shouldSilenceDeprecationById(deprecationId = '') {
8+
return DEPRECATIONS_TO_SILENCE[deprecationId];
9+
}
10+
11+
export function initialize() {
12+
registerDeprecationHandler((message, options, next) => {
13+
if (options && shouldSilenceDeprecationById(options.id)) {
14+
return;
15+
} else {
16+
next(message, options);
17+
}
18+
});
19+
}
20+
21+
export default { initialize };

packages/@css-blocks/ember-cli/tests/test-helper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ import { start } from 'ember-qunit';
55

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

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

0 commit comments

Comments
 (0)