mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-08 08:06:27 +00:00
Actually update tests
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
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',
|
||||
'',
|
||||
@@ -10,7 +13,11 @@ test('no arguments', () => {
|
||||
'',
|
||||
'-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();
|
||||
});
|
||||
|
||||
@@ -71,8 +71,6 @@ const buildExec = () => {
|
||||
}
|
||||
}
|
||||
|
||||
console.log(context);
|
||||
|
||||
if (token) {
|
||||
options.env.CODECOV_TOKEN = token;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user