Skip to content

Commit

Permalink
chore(dep): dep update (#582)
Browse files Browse the repository at this point in the history
* chore(deps): dep update

* fix(test): fix e2e summoner test
  • Loading branch information
OllieJennings authored May 18, 2024
1 parent 0a09a1e commit fb79e79
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 921 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
eslint.config.mjs
18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

10 changes: 4 additions & 6 deletions __tests__/e2e/match_v5.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { PlatformId, RiotAPI } from "../../src/index";
jest.unmock("@fightmegg/riot-rate-limiter");

const riotAPIKey = process.env.X_RIOT_API_KEY || "";
const puuid = process.env.PUUID || "";

describe("E2E", () => {
describe("Match V5", () => {
Expand All @@ -12,8 +13,7 @@ describe("E2E", () => {

const resp = await rAPI.matchV5.getIdsByPuuid({
cluster: PlatformId.EUROPE,
puuid:
"8bJQbDi6uFIgefQA6Y79yxff_1bCHNopb1eHlq3p7Ic2oeXgYTvNnfGahtWyJ6qqAue3uK6wiZmMWQ",
puuid,
params: {
start: 0,
count: 5,
Expand All @@ -27,8 +27,7 @@ describe("E2E", () => {

const matchIds = await rAPI.matchV5.getIdsByPuuid({
cluster: PlatformId.EUROPE,
puuid:
"8bJQbDi6uFIgefQA6Y79yxff_1bCHNopb1eHlq3p7Ic2oeXgYTvNnfGahtWyJ6qqAue3uK6wiZmMWQ",
puuid,
params: {
start: 0,
count: 5,
Expand Down Expand Up @@ -67,8 +66,7 @@ describe("E2E", () => {

const matchIds = await rAPI.matchV5.getIdsByPuuid({
cluster: PlatformId.EUROPE,
puuid:
"8bJQbDi6uFIgefQA6Y79yxff_1bCHNopb1eHlq3p7Ic2oeXgYTvNnfGahtWyJ6qqAue3uK6wiZmMWQ",
puuid,
params: {
start: 0,
count: 5,
Expand Down
10 changes: 5 additions & 5 deletions __tests__/e2e/summoner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ import "jest-extended";
import { PlatformId, RiotAPI } from "../../src/index";

const riotAPIKey = process.env.X_RIOT_API_KEY || "";
const puuid = process.env.PUUID || "";

describe("E2E", () => {
describe("Summoner", () => {
test("getBySummonerName", async () => {
test("getByPUUID", async () => {
const rAPI = new RiotAPI(riotAPIKey);

const resp = await rAPI.summoner.getBySummonerName({
const resp = await rAPI.summoner.getByPUUID({
region: PlatformId.EUW1,
summonerName: "Demos Kratos",
puuid,
});
expect(resp.name).toEqual("Demos Kratos");
expect(resp.puuid).toEqual(puuid);
expect(resp).toContainAllKeys([
"id",
"accountId",
"puuid",
"name",
"profileIconId",
"revisionDate",
"summonerLevel",
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("Cache", () => {

describe("RedisCache", () => {
let redCache: RedisCache;
let mockedRedis = jest.mocked(Redis);
const mockedRedis = jest.mocked(Redis);

beforeEach(() => {
jest.clearAllMocks();
Expand Down
Loading

0 comments on commit fb79e79

Please sign in to comment.