Skip to content

Commit

Permalink
Actually update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu committed Mar 9, 2021
1 parent 227f879 commit 21a1e29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 9 additions & 2 deletions src/buildExec.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import buildExec from './buildExec';
const github = require('@actions/github');
const context = github.context;

test('no arguments', () => {
const {execArgs, filepath, failCi} = buildExec();
expect(execArgs.slice(0, -2)).toEqual([

args = [
'codecov.sh',
'-n',
'',
'-F',
'',
'-Q',
'github-action',
]);
];
if (context.eventName == 'pull_request') {
args.push('-C', `${context.payload.pull_request.head.sha}`);
}
expect(execArgs).toEqual(args);
expect(filepath).toEqual('codecov.sh');
expect(failCi).toBeFalsy();
});
Expand Down
2 changes: 0 additions & 2 deletions src/buildExec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ const buildExec = () => {
}
}

console.log(context);

if (token) {
options.env.CODECOV_TOKEN = token;
}
Expand Down

0 comments on commit 21a1e29

Please sign in to comment.