是否有任何方便的代码覆盖率测量工具/框架,我可以轻松地将其用于测量Angular2-TypeScript代码的代码覆盖率以及用QUnit编写的测试?
我看到很少像remap-istanbul,blanket.js这样的框架,但是这些框架在所有来自Angular2库的import语句中都抛出异常(例如angular2 / core或@ angular / core)< / p>
答案 0 :(得分:0)
你尝试过使用业力吗?
PS:if (gatt.setCharacteristicNotification(characteristic, true)) {
BluetoothGattDescriptor descriptor = characteristic.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"));
if (descriptor != null) {
if ((characteristic.getProperties() & BluetoothGattCharacteristic.PROPERTY_NOTIFY) != 0) {
descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
} else if ((characteristic.getProperties() & BluetoothGattCharacteristic.PROPERTY_INDICATE) != 0) {
descriptor.setValue(BluetoothGattDescriptor.ENABLE_INDICATION_VALUE);
} else {
// The characteristic does not have NOTIFY or INDICATE property set;
}
if (gatt.writeDescriptor(descriptor)) {
// Success
} else {
// Failed to set client characteristic notification;
}
} else {
// Failed to set client characteristic notification;
}
} else {
// Failed to register notification;
}
已移至angular2/core
PPS:本来是把它写成评论,但我没有足够的声誉......