Update code formatting
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user