github
1353 of 1530 branches covered (88.43%)
Branch coverage included in aggregate %.
69 of 1501 new or added lines in 20 files covered. (4.6%)
2 existing lines in 1 file now uncovered.5530 of 10779 relevant lines covered (51.3%)
28.21 hits per line
NEW
|
import type { ErrorHandlerCallback } from 'react-native'; |
× |
NEW
|
import '@testing-library/jest-native/extend-expect'; |
× |
NEW
|
|
× |
NEW
|
Object.defineProperty(globalThis, 'name', { |
× |
NEW
|
value: 'React Native 单元测试', |
× |
NEW
|
}); |
× |
NEW
|
|
× |
NEW
|
Object.defineProperty(globalThis, 'ErrorUtils', { |
× |
NEW
|
value: function () {
|
× |
NEW
|
let handler: ErrorHandlerCallback | null = null; |
× |
NEW
|
return {
|
× |
NEW
|
triggerError(err: Error | string) {
|
× |
NEW
|
handler?.(err); |
× |
NEW
|
}, |
× |
NEW
|
setGlobalHandler(cb: ErrorHandlerCallback) { |
× |
NEW
|
handler = cb; |
× |
NEW
|
}, |
× |
NEW
|
getGlobalHandler() { |
× |
NEW
|
return handler;
|
× |
NEW
|
}, |
× |
NEW
|
}; |
× |
NEW
|
}, |
× |
NEW
|
}); |
× |