File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ vi.mock("@actions/github", () => ({
2222 graphql : mockedGraphql ,
2323 } ) ,
2424} ) ) ;
25- vi . mock ( "@actions/core" , { spy : true } ) ;
26- const mockedWarning = vi . mocked ( core . warning ) ;
25+ vi . mock ( "@actions/core" , async ( importOriginal ) => ( {
26+ ...( await importOriginal < typeof import ( "@actions/core" ) > ( ) ) ,
27+ error : vi . fn ( ) ,
28+ notice : vi . fn ( ) ,
29+ warning : vi . fn ( ) ,
30+ } ) ) ;
2731vi . mock ( "@changesets/ghcommit" ) ;
2832
2933let mockedGithubMethods = {
@@ -133,7 +137,7 @@ describe("publish", () => {
133137 } ) ;
134138
135139 expect ( result ) . toEqual ( { published : false , exitCode : 0 } ) ;
136- expect ( mockedWarning ) . toHaveBeenCalledWith (
140+ expect ( core . warning ) . toHaveBeenCalledWith (
137141 expect . stringContaining (
138142 "GitHub releases and git tags cannot be created without this output" ,
139143 ) ,
You can’t perform that action at this time.
0 commit comments