Comments (1)
Here's a standalone test that can be simply be copied + pasted and run locally to reproduce the juxtaposition:
module
test.ts
:
// v0.226.0 - https://github.com/denoland/deno_std/blob/release-2024.06.03/assert/deno.json#L3
import { assertAlmostEquals as assertAlmostEquals_0_226_0 } from "https://raw.githubusercontent.com/denoland/deno_std/release-2024.06.03/assert/assert_almost_equals.ts";
// v1.0.0-rc.1 - https://github.com/denoland/deno_std/blob/release-2024.06.06/assert/deno.json#L3
import { assertAlmostEquals as assertAlmostEquals_1_0_0_rc_1 } from "https://raw.githubusercontent.com/denoland/deno_std/release-2024.06.06/assert/assert_almost_equals.ts";
const positiveActual = 9.888977057628651;
const positiveExpected = 9.888977058;
const negativeActual = -9.888977057628651;
const negativeExpected = -9.888977058;
Deno.test("0.226.0 - positive", () => {
assertAlmostEquals_0_226_0(positiveActual, positiveExpected);
});
Deno.test("0.226.0 - negative", () => {
assertAlmostEquals_0_226_0(negativeActual, negativeExpected);
});
Deno.test("1.0.0-rc.1 - positive", () => {
assertAlmostEquals_1_0_0_rc_1(positiveActual, positiveExpected);
});
Deno.test("1.0.0-rc.1 - negative", () => {
assertAlmostEquals_1_0_0_rc_1(negativeActual, negativeExpected);
});
output
% deno --version
deno 1.44.1 (release, aarch64-apple-darwin)
v8 12.6.228.3
typescript 5.4.5
% deno test test.ts
running 4 tests from ./test.ts
0.226.0 - positive ... ok (0ms)
0.226.0 - negative ... ok (0ms)
1.0.0-rc.1 - positive ... ok (0ms)
1.0.0-rc.1 - negative ... FAILED (0ms)
ERRORS
1.0.0-rc.1 - negative => ./test.ts:24:6
error: AssertionError: Expected actual: "-9.88897705762865e+0" to be close to "-9.888977058e+0": delta "3.7134917363346176e-10" is greater than "-9.888977058e-7".
throw new AssertionError(
^
at assertAlmostEquals (https://raw.githubusercontent.com/denoland/deno_std/release-2024.06.06/assert/assert_almost_equals.ts:51:9)
at file:///Users/deno/test.ts:25:3
FAILURES
1.0.0-rc.1 - negative => ./test.ts:24:6
FAILED | 3 passed | 1 failed (1ms)
error: Test failed
from deno_std.
Related Issues (20)
- Check the usage of TextDecoder
- Rename the repository to `std` HOT 1
- question(collections): `intersect()` function name differ from Set method name HOT 1
- docs: more thoroughly document `expect.toThrow()` behavior HOT 2
- feat request: add a pluralize word function HOT 4
- feat request: expose publicly `capitalizeWord` (or similar) HOT 9
- http/file-server, media_types: new addition `application/mp4` to mime db overrides `video/mp4` and breaks some net players HOT 7
- isGlob and globToRegExp do not support windows paths HOT 4
- feat req: add enums for WebSocket status HOT 1
- feat req (html): add a validator for custom name elements ? HOT 4
- to-do: add doc check for JSDoc tags that aren't needed
- to-do(yaml): document different YAML schemas
- proposal: remove `examplePath` option from `@std/dotenv/load`
- proposal: remove `defaultPath` from `@std/dotenv/load`
- Performance: `levenshteinDistance` becomes extremely slow for large edit distances HOT 5
- The windows logic in std/path breaks in DNT HOT 2
- tracking: support iterables in `@std/collections` APIs
- to-do: review custom error classes
- suggestion: add CBOR encoding/decoding HOT 1
- to-do: fix unstable notices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno_std.