This repository has been archived by the owner on Jun 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from snyk/feat/homebase_prefix
feat: enable configuration of homebase url origin
- Loading branch information
Showing
5 changed files
with
20 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const test = require('tap').test; | ||
const nock = require('nock'); | ||
const sinon = require('sinon'); | ||
const needle = require('needle'); | ||
|
||
const config = require('../lib/config'); | ||
|
||
test('Beacons and snapshots are sent to configured base url', async function(t) { | ||
config.initConfig({projectId: 'whatever', baseUrl: 'http://localhost:8000'}); | ||
t.equal(config.beaconUrl, 'http://localhost:8000/api/v1/beacon', 'beacon url with prefix is correct') | ||
t.equal(config.snapshotUrl, 'http://localhost:8000/api/v2/snapshot/whatever/node', 'snapshot url with prefix is correct') | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters