Skip to content

Commit

Permalink
Test: Improve failure details of requireQUnit() test
Browse files Browse the repository at this point in the history
Avoid dumping the entire QUnit object.
  • Loading branch information
Krinkle committed Aug 27, 2024
1 parent a696648 commit efae08d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/cli/require-qunit-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ QUnit.module('requireQUnit', function (hooks) {
const requireQUnit = require('../../src/cli/require-qunit');
process.chdir(path.join(__dirname, './fixtures/require-from-cwd'));

assert.propEqual(requireQUnit(), { version: 'from-cwd' });
assert.strictEqual(requireQUnit().version, 'from-cwd');
});

// For development mode invoked locally,
// or for global install without local dependency installed.
QUnit.test('finds relative self', function (assert) {
const globalQUnit = {
version: 'from-global'
const fakeQUnit = {
version: 'from-fake'
};
const requireQUnit = proxyquire('../../src/cli/require-qunit', {
qunit: null,
'../../qunit/qunit': globalQUnit
'../../qunit/qunit': fakeQUnit
});
assert.strictEqual(requireQUnit(resolveStub), globalQUnit);
assert.strictEqual(requireQUnit(resolveStub).version, 'from-fake');
});

QUnit.test('throws error if none of the modules are found', function (assert) {
Expand Down

0 comments on commit efae08d

Please sign in to comment.