Skip to content

Commit

Permalink
test: add coverage for theme build option
Browse files Browse the repository at this point in the history
  • Loading branch information
ignace committed Dec 10, 2023
1 parent e4de39c commit 028bee6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions test-buildtime-options-app/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = function (defaults) {
setConfig: {
'ember-qunit': {
disableContainerStyles: true,
theme: 'qunit-default',
},
},
},
Expand Down
17 changes: 17 additions & 0 deletions test-buildtime-options-app/tests/unit/theme-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { module, test } from 'qunit';
import { assert as debugAssert } from '@ember/debug';

module('theme', function () {
function style(element) {
return window.getComputedStyle(element);
}

test('the qunit-default themes are present when used', async function (assert) {
let qunitHeader = document.getElementById('qunit-header');

debugAssert(`#qunit-header must exist`, qunitHeader);

// Defaults
assert.strictEqual(style(qunitHeader).backgroundColor, 'rgb(13, 51, 73)');
});
});

0 comments on commit 028bee6

Please sign in to comment.