Skip to content

Commit

Permalink
Restored coveralls processing in CI; cleaned up and added tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekhyt committed Jan 28, 2021
1 parent ff08bfa commit b519e0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions test/unit/Runner.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit b519e0b

Please sign in to comment.