Skip to content

Commit

Permalink
You might not need lodash (ant-design#10108)
Browse files Browse the repository at this point in the history
Lodash used only here. So you can replace uniq function by Set and you can remove lodash.
  • Loading branch information
codesignist authored Aug 8, 2022
1 parent 339511c commit d5808b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/e2e/baseLayout.e2e.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Page } from '@playwright/test';
import type { Page } from '@playwright/test';
import { expect, test } from '@playwright/test';
const { uniq } = require('lodash');
const RouterConfig = require('../../config/routes').default;

const BASE_URL = `http://localhost:${process.env.PORT || 8001}`;
Expand All @@ -21,7 +20,7 @@ function formatter(routes: any, parentPath = ''): string[] {
);
}
});
return uniq(result.filter((item) => !!item));
return [...new Set(result.filter((item) => !!item))];
}

const testPage = (path: string, page: Page) => async () => {
Expand Down

0 comments on commit d5808b4

Please sign in to comment.