diff options
Diffstat (limited to 'std/testing/asserts.ts')
-rw-r--r-- | std/testing/asserts.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts index 1d58f0a00..d46b26ded 100644 --- a/std/testing/asserts.ts +++ b/std/testing/asserts.ts @@ -330,10 +330,10 @@ export function assertNotStrictEquals( } /** - * Make an assertion that actual contains expected. If not + * Make an assertion that actual includes expected. If not * then thrown. */ -export function assertStringContains( +export function assertStringIncludes( actual: string, expected: string, msg?: string, @@ -347,26 +347,26 @@ export function assertStringContains( } /** - * Make an assertion that `actual` contains the `expected` values. + * Make an assertion that `actual` includes the `expected` values. * If not then an error will be thrown. * * Type parameter can be specified to ensure values under comparison have the same type. * For example: *```ts - *assertArrayContains<number>([1, 2], [2]) + *assertArrayIncludes<number>([1, 2], [2]) *``` */ -export function assertArrayContains( +export function assertArrayIncludes( actual: ArrayLike<unknown>, expected: ArrayLike<unknown>, msg?: string, ): void; -export function assertArrayContains<T>( +export function assertArrayIncludes<T>( actual: ArrayLike<T>, expected: ArrayLike<T>, msg?: string, ): void; -export function assertArrayContains( +export function assertArrayIncludes( actual: ArrayLike<unknown>, expected: ArrayLike<unknown>, msg?: string, @@ -388,7 +388,7 @@ export function assertArrayContains( return; } if (!msg) { - msg = `actual: "${_format(actual)}" expected to contain: "${ + msg = `actual: "${_format(actual)}" expected to include: "${ _format(expected) }"\nmissing: ${_format(missing)}`; } |