Skip to content

Commit

Permalink
Cleaning up tests and loading of test data, updating mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-murray authored Oct 14, 2021
1 parent a3f0a01 commit 7b168ce
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 193 deletions.
11 changes: 11 additions & 0 deletions .github_application
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"test": {
"applicationId": 123456,
"privateKey": "-----BEGIN RSA PRIVATE KEY-----\nk3y_g03s_her3\n-----END RSA PRIVATE KEY-----\n",
"repo": {
"owner": "your-org-name",
"repo": "your-repo-name"
},
"org": "octodemo"
}
}
6 changes: 3 additions & 3 deletions dist/index.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions lib/github-application.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const expect = require('chai').expect
, testValues = require('../test/test-values')
;

const APPLICATION_NAME = 'test'
const APPLICATION_NAME = 'test';

describe('GitHubApplication', () => {

Expand Down Expand Up @@ -119,13 +119,13 @@ describe('GitHubApplication', () => {
);

const accessToken = await app.getInstallationAccessToken(data.id,
{issues: "read"}
{issues: 'read'}
);

expect(accessToken).to.have.property('permissions');
expect(accessToken.permissions).to.eql({
issues: "read",
metadata: "read"
issues: 'read',
metadata: 'read'
});
});

Expand All @@ -135,13 +135,13 @@ describe('GitHubApplication', () => {
);

const accessToken = await app.getInstallationAccessToken(data.id,
{issues: "write"}
{issues: 'write'}
);

expect(accessToken).to.have.property('permissions');
expect(accessToken.permissions).to.eql({
issues: "write",
metadata: "read"
issues: 'write',
metadata: 'read'
});
});

Expand Down
Loading

0 comments on commit 7b168ce

Please sign in to comment.