diff --git a/.travis.yml b/.travis.yml index b715936..b265e70 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ node_js: script: - npm audit - - if [[ ${TRAVIS_NODE_VERSION:0:1} == "8" ]]; then npm run coveralls; else npm test; fi + - if [[ ${TRAVIS_NODE_VERSION:0:2} == "12" ]]; then npm run coveralls; else npm test; fi deploy: provider: npm diff --git a/test/unit/Runner.test.js b/test/unit/Runner.test.js index b11e050..f571314 100644 --- a/test/unit/Runner.test.js +++ b/test/unit/Runner.test.js @@ -5,14 +5,12 @@ const chaiAsPromised = require('chai-as-promised') chai.use(chaiAsPromised) chai.should() +const assert = chai.assert -const express = require('express') const RootEntity = require('../../src/RootEntity') const Saga = require('../../src/Saga') const ReadModel = require('../../src/ReadModel') -const CommandDispatcherLocal = require('../../src/CommandDispatcherLocal') -const EventDispatcherEventEmitter = require('../../src/EventDispatcherEventEmitter') const EventStoreJsonFile = require('../../src/EventStoreJsonFile') const InvalidArgumentError = require('../../src/GenericErrors/InvalidArgumentError') @@ -48,6 +46,12 @@ describe('Runner', () => { subjectUnderTest = new Runner(commandDispatcher, eventDispatcher, logger, server) }) + describe('get server', () => { + it('should get the server', () => { + assert.strictEqual(subjectUnderTest.server, server) + }) + }) + describe('replayHistory', () => { it('should call the replayAll() method of the event dispatcher', async () => { eventDispatcher.replayAll = sinon.stub().resolves()