Skip to content

Commit

Permalink
fix(backend): reachbility url called after short timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jankapunkt committed Oct 25, 2023
1 parent 08441d3 commit d0a2ce9
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions backend/api/endpoints/tests/createReachabilityurl.tests.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
/* eslint-env mocha */
import { Meteor } from 'meteor/meteor'
import { expect } from 'chai'
import { HTTP } from 'meteor/jkuester:http'
import { createReachabilityUrl } from '../createReachabilityUrl'
import { asyncTimeout } from '../../utils/asyncTimeout'

describe(createReachabilityUrl.name, () => {
it('creates a reachability url for a given path', async () => {
it('creates a reachability url for a given path', () => {
const path = '/foo-bar-baz'
createReachabilityUrl({ path })
await asyncTimeout(50)

const url = Meteor.absoluteUrl(path)
const response = HTTP.call('get', url)
expect(response.statusCode).to.equal(204)

expect(() => createReachabilityUrl({ path }))
.to.throw(`Path ${path} already taken!`)
})
Expand Down

0 comments on commit d0a2ce9

Please sign in to comment.