Browse Source
You might not need lodash (#10108)
Lodash used only here. So you can replace uniq function by Set and you can remove lodash.
pull/10185/head
Yunus EŞ
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
3 deletions
-
src/e2e/baseLayout.e2e.spec.ts
|
|
@ -1,6 +1,5 @@ |
|
|
import type { Page } from '@playwright/test'; |
|
|
import type { Page } from '@playwright/test'; |
|
|
import { expect, test } from '@playwright/test'; |
|
|
import { expect, test } from '@playwright/test'; |
|
|
const { uniq } = require('lodash'); |
|
|
|
|
|
const RouterConfig = require('../../config/routes').default; |
|
|
const RouterConfig = require('../../config/routes').default; |
|
|
|
|
|
|
|
|
const BASE_URL = `http://localhost:${process.env.PORT || 8001}`; |
|
|
const BASE_URL = `http://localhost:${process.env.PORT || 8001}`; |
|
|
@ -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 () => { |
|
|
const testPage = (path: string, page: Page) => async () => { |
|
|
|