Skip to content

Commit

Permalink
re structure tests and jest config.
Browse files Browse the repository at this point in the history
  • Loading branch information
SerKnight committed Feb 27, 2020
1 parent da5d5f0 commit 28ba9eb
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
roots: ['<rootDir>/src'],
transform: {
'^.+\\.ts?$': 'ts-jest',
"^.+\\.tsx?$": "ts-jest",
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.ts?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node']
};

testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
testPathIgnorePatterns: ["/lib/", "/node_modules/"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
// collectCoverage: true,
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/xeroClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ export class XeroClient {
return url;
}

async apiCallback(url: string): Promise<TokenSet> {
const params = this.openIdClient.callbackParams(url)
async apiCallback(callbackUrl: string): Promise<TokenSet> {
const params = this.openIdClient.callbackParams(callbackUrl)
const check = {...params}
this.tokenSet = await this.openIdClient.callback(this.config.redirectUris[0], params, check);
this.setAccessToken();
return this.tokenSet
}

async disconnect(tenantId: string): Promise<TokenSet> {
await this.queryApi('DELETE', `https://api.xero.com/connections/${tenantId}`)
async disconnect(connectionId: string): Promise<TokenSet> {
await this.queryApi('DELETE', `https://api.xero.com/connections/${connectionId}`)
this.setAccessToken();
return this.tokenSet
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"exclude": [
"node_modules",
"dist",
"**/*.test.ts"
"src/test/"
]
}

0 comments on commit 28ba9eb

Please sign in to comment.