-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(init): use bare specifier for
jsr:@std/assert
(#24581)
Closes #24580
- Loading branch information
Showing
9 changed files
with
68 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// deno-lint-ignore-file | ||
export function assert(expr: unknown) { | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// deno-lint-ignore-file | ||
export function assertEquals<T>( | ||
actual: T, | ||
expected: T, | ||
msg?: string, | ||
options: { formatter?: (value: unknown) => string } = {}, | ||
) { | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// deno-lint-ignore-file | ||
|
||
export function fail() { | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. | ||
|
||
/** A library of assertion functions. | ||
* If the assertion is false an `AssertionError` will be thrown which will | ||
* result in pretty-printed diff of failing assertion. | ||
* | ||
* This module is browser compatible, but do not rely on good formatting of | ||
* values for AssertionError messages in browsers. | ||
* | ||
* ```ts | ||
* import { assert } from "@std/assert/assert"; | ||
* | ||
* assert("I am truthy"); // Doesn't throw | ||
* assert(false); // Throws `AssertionError` | ||
* ``` | ||
* | ||
* @module | ||
*/ | ||
|
||
export * from "./assert_equals.ts"; | ||
export * from "./assert.ts"; | ||
export * from "./fail.ts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"exports": { | ||
".": "./mod.ts", | ||
"./assert": "./assert.ts", | ||
"./assert-equals": "./assert-equals.ts", | ||
"./fail": "./fail.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
"scope": "std", | ||
"name": "assert", | ||
"latest": "0.220.1", | ||
"latest": "1.0.0", | ||
"versions": { | ||
"1.0.0": {}, | ||
"0.220.1": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters