Skip to content

Commit 3c1c0a3

Browse files
committed
chore: added test assertion messages
1 parent 4aad0aa commit 3c1c0a3

1 file changed

Lines changed: 30 additions & 6 deletions

File tree

tests/unit/test-firefox/test.firefox.js

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,18 @@ describe('firefox', () => {
326326
const isDefault = await firefox.isDefaultProfile(
327327
'manually-set-default', FakeProfileFinder
328328
);
329+
assert.equal(
330+
isDefault, true,
331+
'Manually configured default profile'
332+
);
333+
329334
const isNotDefault = await firefox.isDefaultProfile(
330335
'unkown-profile-name', FakeProfileFinder
331336
);
332-
333-
assert.equal(isDefault, true);
334-
assert.equal(isNotDefault, false);
337+
assert.equal(
338+
isNotDefault, false,
339+
'Unknown profile name'
340+
);
335341
});
336342
});
337343

@@ -367,19 +373,37 @@ describe('firefox', () => {
367373
path.join(profilesDirPath, 'fake-default-profile'),
368374
FakeProfileFinder
369375
);
370-
assert.equal(isFirefoxDefaultPath, true);
376+
assert.equal(
377+
isFirefoxDefaultPath, true,
378+
'Firefox default profile'
379+
);
371380

372381
const isDevEditionDefaultPath = await firefox.isDefaultProfile(
373382
path.join(profilesDirPath, 'fake-devedition-default-profile'),
374383
FakeProfileFinder
375384
);
376-
assert.equal(isDevEditionDefaultPath, true);
385+
assert.equal(
386+
isDevEditionDefaultPath, true,
387+
'Firefox DevEdition default profile'
388+
);
377389

378390
const isManuallyDefault = await firefox.isDefaultProfile(
379391
absProfilePath,
380392
FakeProfileFinder
381393
);
382-
assert.equal(isManuallyDefault, true);
394+
assert.equal(
395+
isManuallyDefault, true,
396+
'Manually configured default profile'
397+
);
398+
399+
const isNotDefault = await firefox.isDefaultProfile(
400+
path.join(profilesDirPath, 'unkown-profile-dir'),
401+
FakeProfileFinder
402+
);
403+
assert.equal(
404+
isNotDefault, false,
405+
'Unknown profile path'
406+
);
383407
});
384408
});
385409

0 commit comments

Comments
 (0)