Skip to content
This repository was archived by the owner on Aug 14, 2020. It is now read-only.

Commit a058a31

Browse files
minor improvements
1 parent 7c5ac7a commit a058a31

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ const exec = require('@actions/exec')
33

44
const SCOPE_DSN = 'SCOPE_DSN'
55

6+
const DEFAULT_COMMAND =
7+
'npm test --testRunner=@undefinedlabs/scope-agent/jestTestRunner --runner=@undefinedlabs/scope-agent/jestRunner --setupFilesAfterEnv=@undefinedlabs/scope-agent/jestSetupTests'
8+
69
async function run() {
710
try {
8-
const command = core.getInput('command') || 'npm test'
11+
const command = core.getInput('command') || DEFAULT_COMMAND
912
const dsn = core.getInput('dsn') || process.env[SCOPE_DSN]
1013

1114
if (!dsn) {
@@ -28,15 +31,12 @@ async function run() {
2831
ignoreReturnCode: true,
2932
})
3033

31-
await ExecScopeRun(command, apiEndpoint, apiKey)
34+
return ExecScopeRun(command, apiEndpoint, apiKey)
3235
} catch (error) {
3336
core.setFailed(error.message)
3437
}
3538
}
3639

37-
const DEFAULT_COMMAND =
38-
'npm test --testRunner=@undefinedlabs/scope-agent/jestTestRunner --runner=@undefinedlabs/scope-agent/jestRunner --setupFilesAfterEnv=@undefinedlabs/scope-agent/jestSetupTests'
39-
4040
function ExecScopeRun(command = DEFAULT_COMMAND, apiEndpoint, apiKey) {
4141
return exec.exec(command, null, {
4242
env: {

0 commit comments

Comments
 (0)