Skip to content

Commit

Permalink
Better test description
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm authored Dec 27, 2024
1 parent e1b1998 commit 07f9407
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/mainLoop.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as should from 'should'
const http = require('http')
const sleepTime = 100
var counter = 1
var port = 25212
var lastReq
Expand Down Expand Up @@ -89,8 +90,8 @@ const wrappedStart = async(config, q, cloudQueue) => {

const queue = require('queue')

describe('That main function polling over there', () => {
it('Should be possible to start I guess', async () => {
describe('Main cloud loop', () => {
it('Should not double start things in any way', async () => {
const myQueue = queue()
const myCloudQueue = queue()
var myConfig = {
Expand All @@ -100,8 +101,8 @@ describe('That main function polling over there', () => {
baseUrl: 'http://localhost:' + port,
runCloud: true,
hostname: 'myHostName',
sleepTime: 100,
cloudSleepTime: 100
sleepTime: sleepTime,
cloudSleepTime: sleepTime
}
myCloudQueue.on('end', function() {
wrappedStart(myConfig, myQueue, myCloudQueue)
Expand All @@ -113,8 +114,8 @@ describe('That main function polling over there', () => {
}
stopIt()
server.close()
if (smallestInterval < 100) {
throw new Error('Smallest interval (' + smallestInterval + ') was smaller than the smallest pause')
if (smallestInterval < sleepTime) {
throw new Error('Smallest interval (' + smallestInterval + ') was smaller than the smallest pause (' + sleepTime + ')')
}
resolve(null)
})
Expand Down

0 comments on commit 07f9407

Please sign in to comment.