Skip to content

Commit

Permalink
fix osjs tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Nov 25, 2024
1 parent 3578811 commit 1946c74
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"test:ci:unit": "pnpm concurrent \"pnpm test:unit\" \"pnpm test:lint\" \"tsc -p tests/integration\" \"tsc -p tests/unit\"",
"============MISC": "============",
"concurrent": "concurrently --raw --kill-others-on-fail",
"build:packages": "concurrently --raw \"pnpm --stream -r build:esbuild\" \"pnpm --stream -r build:types\"",
"build:packages": "concurrently --raw \"pnpm -r build:esbuild\" \"pnpm -r build:types\"",
"============monorepo": "============",
"monorepo:build": "pnpm concurrent \"pnpm build:packages\" \"pnpm gen\" && pnpm build:esbuild",
"monorepo:test": "pnpm concurrent \"pnpm --stream -r test\" \"pnpm test\""
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/Bank.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it, test } from 'vitest';

import { Bank, EItem, type ItemBank, Items, addItemToBank, getItemOrThrow, itemID, resolveNameBank } from '../dist';
import { Bank, EItem, type ItemBank, Items, addItemToBank, getItemOrThrow, itemID, resolveNameBank } from '../';

describe('Bank', () => {
test('convert string bank to number bank', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/BankClass.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test, vi } from 'vitest';

import { Bank, type Item, Items, LootTable, getItemOrThrow, itemID, resolveNameBank } from '../dist';
import { Bank, type Item, Items, LootTable, getItemOrThrow, itemID, resolveNameBank } from '../';

const TestLootTable = new LootTable().add('Toolkit');

Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/EItem.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, test } from 'vitest';
import { EItem } from '../dist';
import { EItem } from '../';

test('EItem', async () => {
expect(EItem.TWISTED_BOW).toEqual(20997);
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/Hiscores.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from 'vitest';

import { Hiscores } from '../dist';
import { Hiscores } from '../';

test('Hiscores', async () => {
const koru = await Hiscores.fetch('Koru');
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/Items.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { beforeAll, describe, expect, test } from 'vitest';
import { EquipmentSlot, Items, Openables, getItem } from '../dist';
import { EquipmentSlot, Items, Openables, getItem } from '../';

const expectedIDTuple = [
['Coins', 995],
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/LootTable.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest';
import { Bank, LootTable } from '../dist';
import { Bank, LootTable } from '../';

describe('LootTable', async () => {
it('should clone', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/Monsters.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { beforeAll, describe, test } from 'vitest';
import { LootTable, Monsters, SimpleMonster, itemTupleToTable } from '../dist';
import { LootTable, Monsters, SimpleMonster, itemTupleToTable } from '../';
import { checkThreshold } from './testUtil';

describe('Monsters', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/Openables.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, test } from 'vitest';
import { Openables, itemID } from '../dist';
import { Openables, itemID } from '../';

describe('Openables', () => {
test('allItems', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/Raids.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, test } from 'vitest';
import { ChambersOfXeric } from '../dist';
import { ChambersOfXeric } from '../';

test('Chambers Of Xeric', async () => {
expect.assertions(3);
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/Util.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, test } from 'vitest';
import { fromKMB, getBrimKeyChanceFromCBLevel, toKMB } from '../dist';
import { fromKMB, getBrimKeyChanceFromCBLevel, toKMB } from '../';

describe('Utils', () => {
test('toKMB checks', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/Wiki.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, test } from 'vitest';
import { Wiki } from '../dist';
import { Wiki } from '../';

describe('Wiki', () => {
test('Searching', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/items.sanity.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, test } from 'vitest';

import { Items } from '../dist';
import { Items } from '../';

test('Items Sanity Test', async () => {
const item27624 = Items.get(27_624)!;
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/snapshots.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { writeFileSync } from 'node:fs';
import { test } from 'vitest';
import { type Bank, Clues, Monsters } from '../dist';
import { type Bank, Clues, Monsters } from '../';

export function calcDropRatesFromBankWithoutUniques(bank: Bank, iterations: number) {
const results: string[] = [];
Expand Down
2 changes: 1 addition & 1 deletion packages/oldschooljs/test/testUtil.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Bank, Items } from '../dist';
import { type Bank, Items } from '../';

export function withinThreshold(source: number, target: number, epsilon = 5): boolean {
if (source === target) return true;
Expand Down

0 comments on commit 1946c74

Please sign in to comment.