Update code formatting

This commit is contained in:
Thomas Nordquist
2019-06-15 14:56:57 +02:00
parent 6176859c7c
commit 92e045297e
115 changed files with 2988 additions and 1042 deletions

View File

@@ -42,7 +42,7 @@ describe('Edge', () => {
const topics2 = 'foo/foo/baz'.split('/')
const bazEdge2 = TreeNodeFactory.fromEdgesAndValue(topics2, undefined).sourceEdge
if (!bazEdge1 || !bazEdge2) {
if (!bazEdge1 || !bazEdge2) {
throw Error('should not happen')
}

View File

@@ -8,8 +8,8 @@ describe('EventDispatcher', async () => {
this.timeout(300)
setTimeout(() => dispatcher.dispatch('hello'), 5)
const response = await new Promise((resolve) => {
dispatcher.subscribe((msg) => {
const response = await new Promise(resolve => {
dispatcher.subscribe(msg => {
resolve(msg)
})
})

View File

@@ -1,12 +1,12 @@
import 'mocha'
import { TreeNodeFactory } from '../'
import { TreeNodeFactory } from '../'
import { expect } from 'chai'
import { Base64Message } from '../Base64Message';
import { Base64Message } from '../Base64Message'
describe('TreeNode', () => {
const number3 = Base64Message.fromString("3")
const number5 = Base64Message.fromString("5")
const number3 = Base64Message.fromString('3')
const number5 = Base64Message.fromString('5')
it('firstNode should retrieve first node', () => {
const topics = 'foo/bar'.split('/')
const leaf = TreeNodeFactory.fromEdgesAndValue(topics, undefined)

View File

@@ -2,7 +2,7 @@ import 'mocha'
import { TreeNodeFactory } from '../'
import { expect } from 'chai'
import { Base64Message } from '../Base64Message';
import { Base64Message } from '../Base64Message'
describe('TreeNodeFactory', () => {
it('root node must not have a sourceEdge', () => {
@@ -45,7 +45,7 @@ describe('TreeNodeFactory', () => {
expect(node.sourceEdge.name).to.eq('baz')
const barNode = node.sourceEdge.source
if (!barNode || !barNode.sourceEdge) {
if (!barNode || !barNode.sourceEdge) {
expect.fail('should not fail')
return
}