Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu committed Jan 2, 2021
1 parent 853e99a commit 40b489d
Showing 1 changed file with 72 additions and 7 deletions.
79 changes: 72 additions & 7 deletions src/buildExec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test('all arguments', () => {
"directory": "coverage/",
"token": "d3859757-ab80-4664-924d-aef22fa7557b",
"verbose": "t",
"working_directory": "src/",
"working_directory": "src",
"path_to_write_report": "codecov/",
"xcode_derived_data": "~/Library/Developer/Xcode/DerivedData",
"xcode_package": "MyApp"
Expand All @@ -55,16 +55,81 @@ test('all arguments', () => {

let { execArgs, options, filepath, fail_ci } = buildExec();
expect(execArgs).toEqual([
"codecov.sh",
"src/codecov.sh",
"-n",
"",
"codecov",
"-F",
"",
"test",
"-Q",
"github-action"
"github-action",
"-c",
"-N",
"83231650328f11695dfb754ca0f540516f188d27",
"-A",
"--timeout 1",
"-U",
"--timeout 2",
"-e",
"OS,PYTHON",
"-Z",
"-f",
"coverage.xml",
"-f",
"dir1/coverage.xml",
"-f",
"dir2/coverage.xml",
"-X",
"gcov",
"-X",
"coveragepy",
"-X",
"fix",
"-X",
"search",
"-X",
"code",
"-X",
"network",
"-X",
"gcovout",
"-X",
"html",
"-X",
"recursesubs",
"-a",
"--timeout 3",
"-g",
"**/exclude-dir/*.*",
"-x",
"gcov",
"-G",
"**/include-dir/*.*",
"-k",
"demo",
"-B",
"thomasrockhu/test",
"-b",
"1",
"-C",
"9caabca5474b49de74ef5667deabaf74cdacc244",
"-P",
"2",
"-T",
"v1.2",
"-N",
"root/",
"-s",
"coverage/",
"-v",
"-q",
"codecov/",
"-D",
"~/Library/Developer/Xcode/DerivedData",
"-J",
"MyApp",
]);
expect(filepath).toEqual('codecov.sh');
expect(fail_ci).toBeFalsy();
expect(filepath).toEqual('src/codecov.sh');
expect(fail_ci).toBeTruthy();

for (let env of Object.keys(envs)) {
delete process.env["INPUT_" + env.toUpperCase()];
Expand Down

0 comments on commit 40b489d

Please sign in to comment.