clearbit-jsr-mocks
Advanced tools
Comparing version 3.1.1 to 3.2.0
{ | ||
"name": "clearbit-jsr-mocks", | ||
"version": "3.1.1", | ||
"version": "3.2.0", | ||
"description": "jsr-mocks", | ||
@@ -5,0 +5,0 @@ "main": "build/jsr-promise.js", |
@@ -14,6 +14,7 @@ # clearbit-jsr-mocks | ||
```javascript | ||
const yourMock = { foo: 'bar' }; | ||
const remoting = vfr( | ||
new vfrMocks({ | ||
getAccounts: { | ||
method: (_) -> {...yourMock} | ||
method: (arg) => yourMock | ||
} | ||
@@ -20,0 +21,0 @@ }) |
@@ -16,2 +16,18 @@ const { vfrMocks, vfr } = require('../src/jsr-promise.es6'); | ||
test('Handles session timeout', async () => { | ||
const mocks = new vfrMocks({ | ||
foo: { | ||
method: function() {}, | ||
event: { type: 'exception', message: 'expected failure' } | ||
} | ||
}); | ||
const jsr = vfr(mocks); | ||
try { | ||
const res = await jsr({ method: 'foo', args: ['bar'] }); | ||
expect(res).toBe(undefined); | ||
} catch (error) { | ||
expect(error.message).toEqual('expected failure'); | ||
} | ||
}); | ||
test('Can pass options to Remoting', async () => { | ||
@@ -18,0 +34,0 @@ const mocks = new vfrMocks({ |
Sorry, the diff of this file is not supported yet
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
9555
180
51