Skip to content

Commit 82ce565

Browse files
Ishan VeerIshan Veer
authored andcommitted
reverted test file
1 parent 61e4e4f commit 82ce565

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

__tests__/users/App.test.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
const puppeteer = require('puppeteer');
22
const { filteredUsersData } = require('../../mock-data/users');
33
const { mockUserData } = require('../../mock-data/users/mockdata');
4-
const { getUsers } = require('../../users/discord/utils/util');
5-
const { paginateFetchedUsers } = require('../../users/discord/App');
64
const API_BASE_URL = 'https://staging-api.realdevsquad.com';
75

86
describe('App Component', () => {
@@ -104,28 +102,6 @@ describe('App Component', () => {
104102
const url = await page.url();
105103
expect(url).toContain('?tab=verified');
106104
});
107-
it('should fetch and append new users on subsequent pages for both tabs', async () => {
108-
// Mock the getUsers function to return full set of user data.
109-
jest.spyOn(global, getUsers).mockResolveValue([mockUserData]);
110-
111-
// test in_discord tab
112-
await paginateFetchedUsers('in_discord', 1);
113-
expect(usersData['in_discord'].length).toBe(10);
114-
expect(currentPage).toBe(1);
115-
116-
await paginateFetchedUsers('in_discord', 2);
117-
expect(usersData['in_discord'].length).toBe(20);
118-
expect(currentPage).toBe(2);
119-
120-
// test verified tab
121-
await paginateFetchedUsers('verified', 1);
122-
expect(usersData['verified'].length).toBe(10);
123-
expect(currentPage).toBe(1);
124-
125-
await paginateFetchedUsers('verified', 2);
126-
expect(usersData['verified'].length).toBe(20);
127-
expect(currentPage).toBe(2);
128-
});
129105

130106
it('should handle user card clicks and apply active_tab class to clicked card only in discord tab', async () => {
131107
await page.goto(`${BASE_URL}/users/discord/?tab=in_discord`);

0 commit comments

Comments
 (0)