mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
12 lines
359 B
TypeScript
12 lines
359 B
TypeScript
import type { Suite, Task } from '#types'
|
|
|
|
export function isSuite(task: Task): task is Suite {
|
|
return Object.hasOwnProperty.call(task, 'tasks')
|
|
}
|
|
|
|
export function caseInsensitiveMatch(target: string, str2: string) {
|
|
if (typeof target !== 'string' || typeof str2 !== 'string')
|
|
return false
|
|
return target.toLowerCase().includes(str2.toLowerCase())
|
|
}
|