mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-30 09:17:09 +08:00
This CL adds `asserts` to various `assert` functions provided by Chai, and massages some parts of the code base to still typecheck correctly. This is in preparation for removing a bunch of homegrown helpers, but also as proof-of-concept for upstreaming these to DefinitelyTyped once battle-tested in DevTools. The following functions now have `asserts`: - `assert()` - `assert.isOk()` and `assert.ok()` - `assert.isTrue()` and `assert.isNotTrue()` - `assert.isFalse()` and `assert.isNotFalse()` - `assert.isNull()` and `assert.isNotNull()` - `assert.exists()` and `assert.notExists()` - `assert.isDefined()` and `assert.isUndefined()` - `assert.instanceOf()` Bug: 333520272 Change-Id: I852edd4fc579b0d9f9b6a347502d64ea3d12dc46 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5444833 Commit-Queue: Philip Pfaffe <pfaffe@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>