mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-24 01:33:06 +03:00
fix: sort plugin list in test (#4289)
This commit is contained in:
parent
5f0605a5d9
commit
56e653140b
@ -17,7 +17,9 @@ test('plugin should exist', async ({ page }) => {
|
||||
await page.waitForTimeout(50);
|
||||
const packageJson = await page.evaluate(() => {
|
||||
// @ts-expect-error
|
||||
return window.__pluginPackageJson__;
|
||||
return window.__pluginPackageJson__.sort((a, b) =>
|
||||
a.name.localeCompare(b.name)
|
||||
);
|
||||
});
|
||||
const plugins = [
|
||||
'@affine/bookmark-plugin',
|
||||
@ -28,11 +30,13 @@ test('plugin should exist', async ({ page }) => {
|
||||
'@affine/outline-plugin',
|
||||
];
|
||||
expect(packageJson).toEqual(
|
||||
plugins.map(name => ({
|
||||
plugins
|
||||
.map(name => ({
|
||||
name,
|
||||
version: expect.any(String),
|
||||
description: expect.any(String),
|
||||
affinePlugin: expect.anything(),
|
||||
}))
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user