LeaVerou / htest

Declarative, boilerplate-free unit testing
https://htest.dev/
MIT License
20 stars 3 forks source link

equals should compare regexps by comparing `.source` and `.flags` #48

Open LeaVerou opened 1 month ago

LeaVerou commented 1 month ago

Hm or maybe the default .toString()

LeaVerou commented 1 month ago

So, neither actually. RegExp flags are sorted when reserialized, so we should take that into account when comparing and not fail because of flag ordering.