File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change
1
+ import * as core from '@actions/core'
1
2
import { actionStatus } from '../../src/functions/action-status'
2
3
import { truncateCommentBody } from '../../src/functions/truncate-comment-body'
3
4
4
5
var context
5
6
var octokit
6
7
beforeEach ( ( ) => {
7
8
jest . clearAllMocks ( )
9
+
10
+ jest . spyOn ( core , 'debug' ) . mockImplementation ( ( ) => { } )
11
+ jest . spyOn ( core , 'warning' ) . mockImplementation ( ( ) => { } )
12
+
8
13
process . env . GITHUB_SERVER_URL = 'https://github.com'
9
14
process . env . GITHUB_RUN_ID = '12345'
10
15
Original file line number Diff line number Diff line change
1
+ import * as core from '@actions/core'
1
2
import { truncateCommentBody } from '../../src/functions/truncate-comment-body'
2
3
4
+ beforeEach ( ( ) => {
5
+ jest . clearAllMocks ( )
6
+ jest . spyOn ( core , 'debug' ) . mockImplementation ( ( ) => { } )
7
+ jest . spyOn ( core , 'warning' ) . mockImplementation ( ( ) => { } )
8
+ } )
9
+
3
10
test ( 'truncates a long message' , ( ) => {
4
11
const message = 'a' . repeat ( 65537 )
5
12
const got = truncateCommentBody ( message )
You can’t perform that action at this time.
0 commit comments