inspector-api
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "inspector-api", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -26,2 +26,3 @@ const Inspector = require('../index') | ||
}) | ||
const oldImpl = inspector.profiler.session.post | ||
@@ -34,2 +35,3 @@ inspector.heap.session.post = (name, opts, cb) => { if (cb) cb(new Error('takeHeapSnapshot failed')) } | ||
} catch (err) { | ||
inspector.profiler.session.post = oldImpl | ||
expect(err.message).toEqual('takeHeapSnapshot failed') | ||
@@ -36,0 +38,0 @@ } |
@@ -21,4 +21,4 @@ const Inspector = require('../index') | ||
afterEach(() => { | ||
inspector.destroy() | ||
afterEach(async () => { | ||
await inspector.destroy() | ||
}) | ||
@@ -90,2 +90,3 @@ | ||
inspector = new Inspector() | ||
const oldImpl = inspector.profiler.session.post | ||
inspector.profiler.session.post = (name, cb) => { cb(new Error('enable failed')) } | ||
@@ -97,3 +98,5 @@ | ||
await inspector.profiler.stop() | ||
throw new Error('Should have failed!') | ||
} catch (err) { | ||
inspector.profiler.session.post = oldImpl | ||
expect(err.message).toEqual('enable failed') | ||
@@ -105,2 +108,3 @@ } | ||
inspector = new Inspector() | ||
const oldImpl = inspector.profiler.session.post | ||
@@ -112,3 +116,5 @@ try { | ||
await inspector.profiler.stop() | ||
throw new Error('Should have failed!') | ||
} catch (err) { | ||
inspector.profiler.session.post = oldImpl | ||
expect(err.message).toEqual('start failed') | ||
@@ -120,2 +126,3 @@ } | ||
inspector = new Inspector() | ||
const oldImpl = inspector.profiler.session.post | ||
@@ -127,3 +134,5 @@ try { | ||
await inspector.profiler.stop() | ||
throw new Error('Should have failed!') | ||
} catch (err) { | ||
inspector.profiler.session.post = oldImpl | ||
expect(err.message).toEqual('stop failed') | ||
@@ -130,0 +139,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16483
315
93