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 #150 from cqse/fix_relative_collector
Fix relative collector
- Loading branch information
Showing
5 changed files
with
31 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
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
14 changes: 11 additions & 3 deletions
14
packages/teamscale-javascript-instrumenter/test/unit/App.test.ts
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 |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import {App} from "../../src/App"; | ||
import { App } from "../../src/App"; | ||
|
||
test('Postprocessing of config input parameters', () => { | ||
const config = { inputs: ['"abc"', "'cde'"], collector: "'foo'"}; | ||
const config = { inputs: ['"abc"', "'cde'"], collector: "'foo'" }; | ||
App.postprocessConfig(config) | ||
expect(config.inputs[0]).toEqual('abc'); | ||
expect(config.inputs[1]).toEqual('cde'); | ||
expect(config.collector).toEqual('foo'); | ||
}); | ||
}); | ||
|
||
|
||
test('Parsing command-line parameters', () => { | ||
expect(App.parseCommandLine(["--relative-collector", "replace-in-host:app collector", "input.file"]).relative_collector) | ||
.toEqual("replace-in-host:app collector") | ||
expect(App.parseCommandLine(["input.file"]).relative_collector) | ||
.toBeUndefined() | ||
}); |