Make an assertion that actual is less than or equal to expected. If not then throw.
actual
expected
The type of the values to compare.
The actual value to compare.
The expected value to compare.
Optional
The optional message to display if the assertion fails.
import { assertLessOrEqual } from "@std/assert";assertLessOrEqual(1, 2); // Doesn't throwassertLessOrEqual(1, 1); // Doesn't throwassertLessOrEqual(1, 0); // Throws Copy
import { assertLessOrEqual } from "@std/assert";assertLessOrEqual(1, 2); // Doesn't throwassertLessOrEqual(1, 1); // Doesn't throwassertLessOrEqual(1, 0); // Throws
Make an assertion that
actualis less than or equal toexpected. If not then throw.