mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-12-26 01:13:41 +02:00
20 lines
641 B
JavaScript
20 lines
641 B
JavaScript
import {strict as assert} from 'node:assert';
|
|
import {test} from 'mocha';
|
|
import {getThirdPartyExtensions} from '../sdk.mjs';
|
|
|
|
test('README third party extensions must be alphabetically sorted', async () => {
|
|
const thirdPartyExtensions = await getThirdPartyExtensions();
|
|
assert.ok(thirdPartyExtensions.length > 0);
|
|
|
|
const thirdPartyExtensionsNames = thirdPartyExtensions.map(
|
|
(extension) => extension.module.name,
|
|
);
|
|
|
|
const expectedOrder = [...thirdPartyExtensionsNames].sort();
|
|
assert.deepEqual(
|
|
thirdPartyExtensionsNames,
|
|
expectedOrder,
|
|
'Wrong alphabetical order of third party extensions in README.',
|
|
);
|
|
});
|