2023-08-08 06:38:52 +02:00
|
|
|
import { test } from 'mocha';
|
2022-01-31 00:09:44 +02:00
|
|
|
import { strict as assert } from 'node:assert';
|
2023-08-10 17:25:53 +02:00
|
|
|
import { getThirdPartyExtensions } from '../sdk.mjs';
|
2022-01-31 00:09:44 +02:00
|
|
|
|
|
|
|
test('README third party extensions must be alphabetically sorted', async () => {
|
2023-08-08 06:38:52 +02:00
|
|
|
const thirdPartyExtensions = await getThirdPartyExtensions();
|
2022-01-31 00:09:44 +02:00
|
|
|
assert.ok(thirdPartyExtensions.length > 0);
|
|
|
|
|
|
|
|
const thirdPartyExtensionsNames = thirdPartyExtensions.map(
|
|
|
|
(ext) => ext.module.name,
|
|
|
|
);
|
|
|
|
|
|
|
|
const expectedOrder = thirdPartyExtensionsNames.slice().sort();
|
|
|
|
assert.deepEqual(
|
|
|
|
thirdPartyExtensionsNames,
|
|
|
|
expectedOrder,
|
|
|
|
'Wrong alphabetical order of third party extensions in README.',
|
|
|
|
);
|
|
|
|
});
|