Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Add console.log statements in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RLAlpha49 committed Apr 26, 2024
1 parent 8bb16a5 commit 9feaf87
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion __tests__/anilist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ describe('Anilist API Query', () => {

test('user query', async () => {
try {
const response = await aniLink.anilist.query.user({ id: 1, isHTML: false })
const response = await aniLink.anilist.query.user({ id: 542244, isHTML: true })
console.log(response)
expect(response).toBeDefined()
} catch (error: any) {
if (error.response.data) {
Expand All @@ -32,6 +33,7 @@ describe('Anilist API Query', () => {
test('media query', async () => {
try {
const response = await aniLink.anilist.query.media({ id: 1, type: 'ANIME' })
console.log(response)
expect(response).toBeDefined()
} catch (error: any) {
if (error.response.data) {
Expand All @@ -53,6 +55,7 @@ describe('Anilist API Query', () => {
test('media trend query', async () => {
try {
const response = await aniLink.anilist.query.mediaTrend({ mediaId: 1, type: 'ANIME' })
console.log(response)
expect(response).toBeDefined()
} catch (error: any) {
if (error.response.data) {
Expand All @@ -74,6 +77,7 @@ describe('Anilist API Query', () => {
test('airing schedule query should return a response', async () => {
try {
const response = await aniLink.anilist.query.airingSchedule({ mediaId: 130590 }) // id needs to be an airing anime
console.log(response)
expect(response).toBeDefined()
} catch (error: any) {
if (error.response.data) {
Expand All @@ -95,6 +99,7 @@ describe('Anilist API Query', () => {
test('character query should return a response', async () => {
try {
const response = await aniLink.anilist.query.character({ id: 1, asHtml: true, mediaSort: ['POPULARITY_DESC'], mediaType: 'ANIME', mediaOnList: true, mediaPage: 1, mediaPerPage: 10 })
console.log(response)
expect(response).toBeDefined()
} catch (error: any) {
if (error.response.data) {
Expand Down Expand Up @@ -131,6 +136,7 @@ describe('Anilist API Query', () => {
characterMediaPage: 1,
characterMediaPerPage: 10
})
console.log(response)
expect(response).toBeDefined()
} catch (error: any) {
if (error.response.data) {
Expand All @@ -154,6 +160,7 @@ describe('Anilist API Query', () => {
test('media list query should return a response', async () => {
try {
const response = await aniLink.anilist.query.mediaList({ userId: 542244 })
console.log(response)
expect(response).toBeDefined()
} catch (error: any) {
if (error.response.data) {
Expand Down Expand Up @@ -200,6 +207,7 @@ describe('Anilist API Mutation', () => {
restrictMessagesToFollowing: false,
disabledListActivity: [{ type: 'CURRENT', disabled: false }]
})
console.log(response)
expect(response).toBeDefined()
} catch (error: any) {
if (error.response.data) {
Expand Down

0 comments on commit 9feaf87

Please sign in to comment.