Yoshiya Hinosawa

Results 643 comments of Yoshiya Hinosawa

`spy` function already exposes (readonly) `.original` property. Maybe making it writable property is the easiest way to implement this. cc @KyleJune What do you think of this kind of addition?

@KyleJune I agree with you. Let's not make `original` writable, but add `.fake` to spy and make it writable. So the API would probably look like: ```ts const fn =...

@gmzacharydovel jest style mock function is available from `@std/expect` ```js import { expect, fn } from "jsr:@std/expect"; const mock = fn(); mock("foo", 42); expect(mock).toHaveBeenCalledWith("foo", 42); ```

> QQ: Is there a plan to add spyOn to it? Or is the approach expected to be done differently? `std/expect` generally tries to be compatible with jest's assertions and...

I don't think we're ready to make this change for the same reason as https://github.com/denoland/std/pull/6624#issuecomment-2832151328

> These changes are not breaking. They do not force someone to upgrade from Deno v1 to v2 > > In other words, a person can upgrade their packages after...

Note: The below shows the number of active users in last 30 days. A significant proportion of users are still using Deno v1.x

I think subclassing (like smol-toml) is reasonable for now. Also that should be backward compatible and we can implement that in v1.x version of `@std/toml` Temporal might make sense in...

I'm not sure that option makes sense. If the leading zeros removed, there's no difference between "00:00:13:05" and "00:13:05:00" (both become "13:05", and I think that would be confusing)

I'm skeptical that adding option is worth it as string method of javascript is enough flexible to support this kind of situation. If you prefer to strip the leading zeros...