diff --git a/hiviewdfx/hicheckertest/hicheckerjstest/src/main/js/default/test/HiChecker.test.js b/hiviewdfx/hicheckertest/hicheckerjstest/src/main/js/default/test/HiChecker.test.js index 76288c23dfe328c04a975b7cce25a60312d25274..1f0aea7eb985e6dd30e6b3d311b739898246ef5f 100644 --- a/hiviewdfx/hicheckertest/hicheckerjstest/src/main/js/default/test/HiChecker.test.js +++ b/hiviewdfx/hicheckertest/hicheckerjstest/src/main/js/default/test/HiChecker.test.js @@ -86,15 +86,21 @@ describe('HiCheckerTest', function () { */ it('HiCheckerTest003', 0, async function (done) { console.info('HiCheckerTest003 start'); - hichecker.addRule(-1); - console.log('add wrong rule!'); - expect(hichecker.contains(-1)).assertEqual(false); - hichecker.addRule(0); - console.log('add wrong rule!'); - expect(hichecker.contains(0)).assertEqual(false); - hichecker.addRule(999999); - console.log('add wrong rule!'); - expect(hichecker.contains(-1)).assertEqual(false); + hichecker.addRule(1n); + console.log('add right rule!'); + expect(hichecker.contains(1n)).assertEqual(true); + try { + hichecker.addRule(0n); + } catch(e) { + console.log('add wrong rule!'); + expect(hichecker.contains(0n)).assertEqual(false); + } + try { + hichecker.addRule(999999n); + } catch(e) { + console.log('add wrong rule!'); + expect(hichecker.contains(999999n)).assertEqual(false); + } done(); }) diff --git a/hiviewdfx/hiview/faultlogger/faultloggerjs/src/main/js/default/test/faultlogger.test.js b/hiviewdfx/hiview/faultlogger/faultloggerjs/src/main/js/default/test/faultlogger.test.js index 87647c8b90de7cf7bb86ddbc9bece596acbc8ea9..0b21f697d57a0b0e568e38d2154e3f024f567dc5 100755 --- a/hiviewdfx/hiview/faultlogger/faultloggerjs/src/main/js/default/test/faultlogger.test.js +++ b/hiviewdfx/hiview/faultlogger/faultloggerjs/src/main/js/default/test/faultlogger.test.js @@ -110,7 +110,7 @@ describe("FaultlogJsTest", function () { expect(typeof(ret[i].module) == "string").assertTrue(); expect(typeof(ret[i].summary) == "string").assertTrue(); expect(typeof(ret[i].fullLog) == "string").assertTrue(); - expect(typeof(ret[i].timestamp) == "number").assertTrue(); + expect(typeof(ret[i].ts) == "number").assertTrue(); expect(true).assertTrue(); } else { expect(false).assertTrue();