Skip to content

Commit

Permalink
🚨 Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DRFR0ST committed Jan 17, 2025
1 parent 4164d6f commit a6342ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests-int/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Libre Link Up API Integrity', () => {
});

test('should successfully read logbook', async () => {
const glucoseReadings = await client.history();
const glucoseReadings = await client.logbook();

expect(glucoseReadings).toBeTruthy();
expect(typeof glucoseReadings[0].value).toBe("number");

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)

Check failure on line 42 in tests-int/client.test.ts

View workflow job for this annotation

GitHub Actions / test

TypeError: undefined is not an object (evaluating 'glucoseReadings[0].value')

at <anonymous> (/home/runner/work/libre-link-unofficial-api/libre-link-unofficial-api/tests-int/client.test.ts:42:35)
Expand Down
4 changes: 2 additions & 2 deletions tests/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ describe('LibreLinkClient', () => {
expect(data).toBeTruthy();
});

test('should return the history', async () => {
test('should return the logbook', async () => {
// Mock the fetch method
mock('llu/connections', { data: { data: LibreLinkConnectionsMock.data } });
mock('llu/connections/*/logbook', { data: { data: [LibreLinkReadMock.connection.glucoseMeasurement] } })

const data = await client.history();
const data = await client.logbook();

expect(data).toBeTruthy();
expect(data[0]).toBeInstanceOf(GlucoseReading);
Expand Down

0 comments on commit a6342ef

Please sign in to comment.