Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("keeps all audio playing", () => {
sinon.assert.calledOnce(mockGame.sound.unsetMute);
});
it('should not allow omit execution of some chains', function(){
sinon.assert.calledOnce(fn1);
sinon.assert.calledOnce(catchFn);
expect(catchFn.getCall(0).args[0]).to.have.property('error','Non-consistent pipe call, message is trying to omit chains')
})
})
it("executes the functions to define validations", function(){
var spy = sinon.spy();
makesure(spy);
sinon.assert.called(spy);
});
});
it('should not call .warn on the underlying Log', () => {
const options = signaling.args[1][1];
sinon.assert.callCount(options.log.warn, 0);
});
});
it('should show history with specific number of records', async function() {
let loggerSpy = sinon.spy(logger, "log");
await history.run(1);
sinon.assert.callCount(loggerSpy, 1);
loggerSpy.restore()
});
.expect(function () {
sinon.assert.calledWith(stubDeclaration, VALID_DATA['terms-and-conditions-input'])
})
.expect('location', `/application-submitted`)
res.on("data", chunk => {
assert.include(chunk.toString(), "BrowserSync");
sinon.assert.calledWith(spy, "called from mw");
proxy.config.rules.push({
match: "<title></title>",
replace: "<title>Shane</title>"
});
http.get(options, (res) => {
res.on("data", chunk => {
assert.include(chunk.toString(), "<title>Shane</title>");
server.close();
done();
});
});
});
});
'use strict'
const sinon = require('sinon')
const chai = require('chai')
sinon.assert.expose(chai.assert, { prefix: '' })
const chaiAsPromised = require('chai-as-promised')
chai.use(chaiAsPromised)
const assert = chai.assert
const mockRequire = require('mock-require')
const MockPlugin = require('./mocks/mock-plugin')
const MockClient = require('./mocks/mock-client')
const RoutingTables = require('ilp-routing').RoutingTables
const Core = require('../src/lib/core')
describe('Core', function () {
beforeEach(function () {
mockRequire('ilp-plugin-mock', MockPlugin)
this.tables = new RoutingTables([], 10)
this.core = new Core({routingTables: this.tables})
it('should initialize a new app', () => {
let instance = {cfInstance: 'test.cloud.com', token: {access_token: 'abc123'} as Token} as Instance;
let app = {name: 'newApp'};
createApp(instance, app);
appsStub.calledOnce.should.equal(true);
setTokenStub.calledOnce.should.equal(true);
addStub.calledOnce.should.equal(true);
sinon.assert.calledWith(appsStub, instance.cfInstance);
sinon.assert.calledWith(setTokenStub, instance.token);
sinon.assert.calledWith(addStub, app);
});
});
it('calls the listen callback', () => {
sinon.assert.calledOnce(listenCallback)
sinon.assert.calledWithExactly(listenCallback, subscription, sinon.match.any)
})