mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-13 16:23:34 +02:00
test: improve test coverage; properly test core client APIs (#6905)
* test: improve test coverage * fix
This commit is contained in:
parent
76cb012209
commit
d85cee576d
41 changed files with 1400 additions and 753 deletions
|
@ -5,11 +5,6 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// Inspired by https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_difference
|
||||
export function difference<T>(...arrays: T[][]): T[] {
|
||||
return arrays.reduce((a, b) => a.filter((c) => !b.includes(c)));
|
||||
}
|
||||
|
||||
// Inspired by https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_sortby-and-_orderby
|
||||
export function sortBy<T>(
|
||||
array: T[],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue