Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Oct 17, 2023
1 parent 4459804 commit 5cbd55e
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version = 1

[[analyzers]]
name = "test-coverage"

[[analyzers]]
name = "javascript"

Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
node: [ 14, 16, 18 ]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
name: Node ${{ matrix.node }}
steps:
Expand Down Expand Up @@ -52,10 +51,6 @@ jobs:
run: |
./codeclimate-test-reporter after-build -t lcov --exit-code $?
- name: Codacy
if: ${{ always() && github.event_name != 'pull_request' && env.CODACY_PROJECT_TOKEN != '' && matrix.node == 16 }}
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ./coverage/lcov.info

- name: Codecov
if: ${{ always() && github.event_name != 'pull_request' && env.CODECOV_TOKEN != '' && matrix.node == 16 }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![DeepSource](https://app.deepsource.com/gh/cityssm/node-avanti-api.svg/?label=active+issues&show_trend=true&token=HZ0BFvBA6JYP4qZAI5MNS6JL)](https://app.deepsource.com/gh/cityssm/node-avanti-api/)
[![Maintainability](https://api.codeclimate.com/v1/badges/fbc4a515303a0cdae005/maintainability)](https://codeclimate.com/github/cityssm/node-avanti-api/maintainability)

A wrapper around the [Avanti API](https://avanti.stoplight.io/docs/avanti-api).
An unofficial wrapper around the [Avanti API](https://avanti.stoplight.io/docs/avanti-api).

**Note:**
At this time, this project focuses only on read-only endpoints, primarily on the
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class AvantiApi {
device_id: 'node-avanti-api-' + Date.now().toString()
}, this.#apiConfiguration);
const request = objectToUrlSearchParameters(requestObject);
const response = await fetch(this.#apiConfiguration.base_api_url + '/connect/token', {
const response = await fetch(`${this.#apiConfiguration.base_api_url}/connect/token`, {
method: 'post',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class AvantiApi {
)

const response = await fetch(
this.#apiConfiguration.base_api_url + '/connect/token',
`${this.#apiConfiguration.base_api_url}/connect/token`,
{
method: 'post',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"engines": {
"node": "^14.13.1 || >=16.0.0"
},
"description": "A wrapper around the Avanti API.",
"description": "An unofficial wrapper around the Avanti API.",
"keywords": [
"avanti",
"payroll"
Expand Down
2 changes: 1 addition & 1 deletion test/config.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const config = {
base_api_url: 'https://stoplight.io/mocks/avanti/avanti-api/6075865',
base_api_url: 'https://stoplight.io/mocks/avanti/avanti-api/180217',
client_id: 'ASI123451',
client_secret: '*****',
username: 'apiuser',
Expand Down
2 changes: 1 addition & 1 deletion test/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import type { AvantiApiConfiguration } from '../types.js'

export const config: AvantiApiConfiguration = {
base_api_url: 'https://stoplight.io/mocks/avanti/avanti-api/6075865',
base_api_url: 'https://stoplight.io/mocks/avanti/avanti-api/180217',
client_id: 'ASI123451',
client_secret: '*****',
username: 'apiuser',
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('node-avanti-api', () => {
assert.ok(jobData.success);
assert.ok(Object.hasOwn(jobData.response, 'employeeJobInfo'));
});
it('Gets employee personal info', async () => {
it.skip('Gets employee personal info', async () => {
const jobData = await avanti.getEmployeePersonalInfo(config.timeEntry_empNo);
console.log(jobData);
assert.ok(jobData.success);
Expand Down
2 changes: 1 addition & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('node-avanti-api', () => {
assert.ok(Object.hasOwn(jobData.response, 'employeeJobInfo'))
})

it('Gets employee personal info', async () => {
it.skip('Gets employee personal info', async () => {
const jobData = await avanti.getEmployeePersonalInfo(config.timeEntry_empNo)

console.log(jobData)
Expand Down

0 comments on commit 5cbd55e

Please sign in to comment.