File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,19 @@ import path from 'path'
3
3
import dotenv from 'dotenv'
4
4
import { getInput } from '../src/input'
5
5
6
+ beforeAll ( ( ) => {
7
+ dotenv . config ( )
8
+ } )
9
+
6
10
test ( 'input' , ( ) => {
7
- process . env . INPUT_TOKEN = 'token'
8
11
process . env . INPUT_GIST_ID = 'gist_id'
9
12
process . env . INPUT_GIST_DESCRIPTION = 'gist_description'
10
13
process . env . INPUT_GIST_FILE_NAME = 'gist_file_name'
11
14
process . env . INPUT_FILE_PATH = 'file_path'
12
15
13
16
const input = getInput ( )
14
17
15
- expect ( input . token ) . toMatch ( 'token' )
18
+ expect ( input . token ) . toBeTruthy ( )
16
19
expect ( input . gistId ) . toMatch ( 'gist_id' )
17
20
expect ( input . gistDescription ) . toMatch ( 'gist_description' )
18
21
expect ( input . gistFileName ) . toMatch ( 'gist_file_name' )
@@ -21,8 +24,6 @@ test('input', () => {
21
24
22
25
test ( 'run' , ( ) => {
23
26
process . env . GITHUB_WORKSPACE = process . cwd ( )
24
- delete process . env . INPUT_TOKEN
25
- dotenv . config ( )
26
27
process . env . INPUT_GIST_ID = 'e885afa349a0e5d1cfb408e46d6a37bc'
27
28
process . env . INPUT_GIST_DESCRIPTION = 'foo bar'
28
29
process . env . INPUT_GIST_FILE_NAME = 'foo.bar'
You can’t perform that action at this time.
0 commit comments