Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests and github actions #1

Merged
merged 5 commits into from
Jan 6, 2020
Merged

Add tests and github actions #1

merged 5 commits into from
Jan 6, 2020

Conversation

gmarcos87
Copy link
Contributor

No description provided.

@github-actions
Copy link

Coverage Report 🎉

Totals Coverage
Statements: 100% ( 50 / 50 )
Methods: 100% ( 16 / 16 )

afterEach(() => {
nock.cleanAll()
nock.enableNetConnect()
it('Returns an error if something fails to create a pull-request request', async (done) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this PR would fail? I found it difficult to figure it out. Also, I noticed that running the tests takes several seconds, and I guess this setTimeout is related to that delay, why do we have it here?

let mockCert: string

beforeAll((done: Function) => {
fs.readFile(path.join(__dirname, 'fixtures/mock-cert.pem'), (err: Error, cert: string) => {
fs.readFile(path.join(__dirname, 'fixtures/mock-cert.pem'), (err: NodeJS.ErrnoException | null, cert: Buffer) => {
if (err) return done(err)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which case are we trying to catch here? What does done do with the err parameter?

@germanferrero
Copy link

Just because I'm curious, Is it possible to use github API to accomplish this task without using with github Apps? If so, is there any real advantage at using github app in our use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants