Add stub tests
This commit is contained in:
parent
08e809b7ae
commit
12f7fc1a8b
@ -1,6 +1,25 @@
|
|||||||
|
import * as github from '@actions/github'
|
||||||
import * as main from '../src/main'
|
import * as main from '../src/main'
|
||||||
|
|
||||||
// Frankly, tests would be entirely useless unless we can mock GitHub somehow.
|
// Frankly, tests would be entirely useless unless we can mock GitHub somehow.
|
||||||
describe('Upload Release Action', () => {
|
describe('Upload Release Action', () => {
|
||||||
it('', async () => {})
|
let spyGetOctokit: jest.SpyInstance<any>
|
||||||
|
let mockOctokit: any
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
mockOctokit = {
|
||||||
|
repos: {
|
||||||
|
createRelease: jest.fn(async () => ({
|
||||||
|
data: {
|
||||||
|
id: 'lalala',
|
||||||
|
upload_url: 'oaoa'
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// spyGetOctokit = jest.spyOn(github, "getOctokit").mockImplementation(() => mockOctokit
|
||||||
|
// jest.spyOn(github, "context", "get").mockImplementation(() => "testtest");
|
||||||
|
})
|
||||||
|
|
||||||
|
it('pls write actual test', async () => {})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user