diff --git a/addon/src/index.js b/addon/src/index.js index 045c482c..8c3660b5 100644 --- a/addon/src/index.js +++ b/addon/src/index.js @@ -1,13 +1,30 @@ /* globals Testem */ -import 'qunit/qunit/qunit.css'; - import { macroCondition, getOwnConfig, importSync } from '@embroider/macros'; +/** + * Load qunit-theme-ember by default, if no custom theme is specified. + */ +if ( + macroCondition( + getOwnConfig()?.theme === undefined || + getOwnConfig()?.theme === 'qunit-default' || + getOwnConfig()?.theme === 'ember' + ) +) { + importSync('qunit/qunit/qunit.css'); +} + if (macroCondition(!getOwnConfig()?.disableContainerStyles)) { importSync('./test-container-styles.css'); } -importSync('qunit-theme-ember/qunit.css'); +if ( + macroCondition( + getOwnConfig()?.theme === undefined || getOwnConfig()?.theme === 'ember' + ) +) { + importSync('qunit-theme-ember/qunit.css'); +} export { default as QUnitAdapter, nonTestDoneCallback } from './adapter'; export { loadTests } from './test-loader';