beforeEach(function beforeEach() { this.sandbox = sinon.sandbox.create() })
describe('jira issue-link', () => { let sandbox; before(() => { sandbox = sinon.sandbox.create(); sandbox.stub(ConfigurationUtils, 'readConfiguration').returns({ API_URL: 'https://example.atlassian.net'}); sandbox.stub(clipboardy, 'write'); IssueLinkAction.run('ABC-16'); }); after(() => { sandbox.restore() }); it('write link to issue into clipboard', () => { sinon.assert.calledWith(clipboardy.write, 'https://example.atlassian.net/browse/ABC-16'); }); });
before(() => { gelfServer = new Graygelf(); gelfServer.listen(); sandbox = sinon.sandbox.create(); sandbox.stub(config.log, 'fieldsFromHTTPHeaders').value({ rid: 'x-rid', clientId: 'x-client-id', }); config.log.hosts = ['localhost', '127.0.0.1']; logStorage = new GelfLogStorage('test-namespace', 'test-id', req); });
beforeEach(function () { sandbox = sinon.sandbox.create(); sandbox.stub(zkClient, "connect", function () { this.emit("connected"); }); sandbox.stub(zkClient, "getChildren", function (path, cb) { cb(zookeeper.Exception.create(zookeeper.Exception.CONNECTION_LOSS), null, 1); }); eventFired = false; });
beforeEach(function () { kclProcess = kcl(new RecordProcessor()); sandbox = sinon.sandbox.create(); });
beforeEach( () => { sandbox = sinon.sandbox.create(); let adsAdded = 0; for (let i = 0; i !== 100; i++) { elements.push(new ProductElement(i + 1, i * 10, i * 15, i * 20, moment())); if ((elements.length - adsAdded) % 20 === 0) { elements.push(new AdElement(i, 'www.abc.com')); adsAdded++; } } });
beforeEach(() => { sandbox = sinon.sandbox.create() mocks = generateMocks(sandbox) id = '123' instance = { stop: sandbox.stub() , remove: sandbox.stub() } Container = proxyquire('../../../lib/Container', mocks) container = new Container(id, instance) })
beforeEach(() => { sandbox = sinon.sandbox.create() mocks = generateMocks(sandbox) sandboxOptions = { "poolSize": 777, "memoryLimitMb": 777, "imageName": "fake/fake-repo", "timeoutMs": 777 } Sandbox = proxyquire('../../../lib/Sandbox', mocks) ourSandbox = new Sandbox(sandboxOptions) })
beforeEach(function() { sandbox = sinon.sandbox.create(); this.request = sandbox.stub(helpers, "doRequest"); clock = sinon.useFakeTimers(); });
beforeEach(() => { sandbox = sinon.sandbox.create() mocks = generateMocks(sandbox) docker = { createContainer: sandbox.stub() } options = { blah: sandbox.stub() } PoolManager = proxyquire('../../../lib/PoolManager', mocks) poolManager = new PoolManager(docker, options) })
sequelizeMockingTape.beforeEach(test, function (t) { sandbox = sinon.sandbox.create(); t.end(); })
beforeEach(function beforeEach() { this.sandbox = sinon.sandbox.create() })
beforeEach(function beforeEach() { this.sandbox = sinon.sandbox.create() })
beforeEach(function () { sinonSandbox = sinon.sandbox.create(); EventEmitter.defaultMaxListeners = 100; // Due to an error when we instanciate too many times fastly some dialects, like the MySql one });
beforeEach(function () { this.sandbox = sinon.sandbox.create() })