Test failure TypeError on fresh create-probot-app from template checks-js with probot >8.0.0
See original GitHub issueBug Report
Current Behavior
Upgrading probot to 8.0.2 or 9.0.0 on a fresh create-probot-app (started with probot 7.5.1 set as "^7.2.0"
), based on the checks-js template results in a test failure.
- code/probot-bug » npx create-probot-app my-first-app
npx: installed 215 in 5.068s
Let's create a Probot app!
Hit enter to accept the suggestion.
? App name: my-first-app
? Description of app: A Probot app
? Author's full name: Greg Burek
? Author's email address: greg.burek@gmail.com
? Homepage:
? GitHub user or org name: gregburek
? Repository name: my-first-app
? Which template would you like to use? checks-js
[snip]
Finished scaffolding files!
Installing Node dependencies!
[snip]
- code/probot-bug » cd my-first-app
- probot-bug/my-first-app » npm run test
> my-first-app@1.0.0 test /Users/gburek/code/probot-bug/my-first-app
> jest && standard
console.warn node_modules/before-after-hook/index.js:45
[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4
PASS test/index.test.js
My Probot app
✓ creates a passing check (1061ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 3.545s
Ran all test suites.
- probot-bug/my-first-app » npm install probot@8
npm WARN deprecated probot@8.0.2: Update to Probot 9, both versios have been released at the same time by accedent. Sorry :(
npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
+ probot@8.0.2
added 32 packages from 17 contributors, removed 7 packages, updated 3 packages and audited 479748 packages in 7.927s
found 0 vulnerabilities
- probot-bug/my-first-app » npm run test
FAIL test/index.test.js
My Probot app
✕ creates a passing check (115ms)
● My Probot app › creates a passing check
TypeError: this.app.getInstallationAccessToken is not a function
at Application.<anonymous> (node_modules/probot/src/application.ts:496:46)
at step (node_modules/probot/lib/application.js:40:23)
at Object.next (node_modules/probot/lib/application.js:21:53)
at node_modules/probot/lib/application.js:15:71
at Object.<anonymous>.__awaiter (node_modules/probot/lib/application.js:11:12)
at Object.auth (node_modules/probot/src/application.ts:495:15)
at Promise.resolve.then (node_modules/@octokit/rest/plugins/authentication/before-request.js:50:20)
Expected behavior/code A passing test with latest probot lib
Environment
- Probot version(s): v8.0.2 and v9.0.0
- Node/npm version: v11.9.0/6.5.0
- OS: OSX 10.13.6
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (5 by maintainers)
Top Results From Across the Web
ProBot - Bot for Discord
A very customizable multipurpose bot for welcome image, In-depth logs, Social commands, Music, Moderation and many more ... Best Welcomer. Give your new...
Read more >Developing an app - Probot
create-probot-app is the best way to start building a new app. It will generate a new app with everything you need to get...
Read more >Discord ProBot - Complete Invite & Setup Guide - YouTube
Complete tutorial for using ProBot on Discord. Including how to invite it to your server, setup settings on the bot Dashboard, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I mock
getInstallationAccessToken
like below.We have to update the tests for the new Probot. We have to pass in a valid app id and private key. This is just for reference, I’ll see how to make this easier