From efae08d4f261aa20d68448975dbd496934c8041c Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 28 Aug 2024 00:24:26 +0100 Subject: [PATCH] Test: Improve failure details of requireQUnit() test Avoid dumping the entire QUnit object. --- test/cli/require-qunit-test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/cli/require-qunit-test.js b/test/cli/require-qunit-test.js index f666641ee..88222464b 100644 --- a/test/cli/require-qunit-test.js +++ b/test/cli/require-qunit-test.js @@ -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) {