From bcb44c6a02f3e589037bf50bfc1375b46c9187ca Mon Sep 17 00:00:00 2001 From: Master-Guy <566429+Master-Guy@users.noreply.github.com> Date: Sat, 19 Mar 2022 16:23:10 +0100 Subject: [PATCH] Removed un-used imports from tests --- .../Netscript/DynamicRamCalculation.test.js | 3 +- test/jest/ui/nFormat.test.js | 33 +++++++++---------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/test/jest/Netscript/DynamicRamCalculation.test.js b/test/jest/Netscript/DynamicRamCalculation.test.js index 55f69203d..b5bd4db8d 100644 --- a/test/jest/Netscript/DynamicRamCalculation.test.js +++ b/test/jest/Netscript/DynamicRamCalculation.test.js @@ -1,5 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import { jest, describe, expect, test } from "@jest/globals"; +import { jest, describe, expect } from "@jest/globals"; import { Player } from "../../../src/Player"; import { NetscriptFunctions } from "../../../src/NetscriptFunctions"; diff --git a/test/jest/ui/nFormat.test.js b/test/jest/ui/nFormat.test.js index e54d28323..56e67a4a6 100644 --- a/test/jest/ui/nFormat.test.js +++ b/test/jest/ui/nFormat.test.js @@ -1,5 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import { jest, describe, expect, test } from "@jest/globals"; +import { describe, expect, test } from "@jest/globals"; import { numeralWrapper } from "../../../src/ui/numeralFormat"; let decimalFormat = '0.[000000]'; @@ -221,28 +220,28 @@ describe('Numeral formatting of scientific text', () => { describe('Finding the number furthest away from 0', () => { test('should work if all numbers are equal', () => { - expect(numeralWrapper.furthestFrom0(0, 0, 0)).toEqual(0); - expect(numeralWrapper.furthestFrom0(1, 1, 1)).toEqual(1); - expect(numeralWrapper.furthestFrom0(123, 123, 123)).toEqual(123); - expect(numeralWrapper.furthestFrom0(-1, -1, -1)).toEqual(-1); - expect(numeralWrapper.furthestFrom0(-123, -123, -123)).toEqual(-123); + expect(numeralWrapper.largestAbsoluteNumber(0, 0, 0)).toEqual(0); + expect(numeralWrapper.largestAbsoluteNumber(1, 1, 1)).toEqual(1); + expect(numeralWrapper.largestAbsoluteNumber(123, 123, 123)).toEqual(123); + expect(numeralWrapper.largestAbsoluteNumber(-1, -1, -1)).toEqual(-1); + expect(numeralWrapper.largestAbsoluteNumber(-123, -123, -123)).toEqual(-123); }); test('should work for different positive numbers, and for the largest number in each spot', () => { - expect(numeralWrapper.furthestFrom0(1, 2, 3)).toEqual(3); - expect(numeralWrapper.furthestFrom0(456, 789, 123)).toEqual(789); - expect(numeralWrapper.furthestFrom0(789123, 123456, 456789)).toEqual(789123); + expect(numeralWrapper.largestAbsoluteNumber(1, 2, 3)).toEqual(3); + expect(numeralWrapper.largestAbsoluteNumber(456, 789, 123)).toEqual(789); + expect(numeralWrapper.largestAbsoluteNumber(789123, 123456, 456789)).toEqual(789123); }); test('should work for different negative numbers, and for the smallest number in each spot', () => { - expect(numeralWrapper.furthestFrom0(-1, -2, -3)).toEqual(-3); - expect(numeralWrapper.furthestFrom0(-456, -789, -123)).toEqual(-789); - expect(numeralWrapper.furthestFrom0(-789123, -123456, -456789)).toEqual(-789123); + expect(numeralWrapper.largestAbsoluteNumber(-1, -2, -3)).toEqual(-3); + expect(numeralWrapper.largestAbsoluteNumber(-456, -789, -123)).toEqual(-789); + expect(numeralWrapper.largestAbsoluteNumber(-789123, -123456, -456789)).toEqual(-789123); }); test('should work for combined positive and negative numbers', () => { - expect(numeralWrapper.furthestFrom0(1, -2, 3)).toEqual(3); - expect(numeralWrapper.furthestFrom0(-456, 789, -123)).toEqual(789); - expect(numeralWrapper.furthestFrom0(789123, -123456, -456789)).toEqual(789123); + expect(numeralWrapper.largestAbsoluteNumber(1, -2, 3)).toEqual(3); + expect(numeralWrapper.largestAbsoluteNumber(-456, 789, -123)).toEqual(789); + expect(numeralWrapper.largestAbsoluteNumber(789123, -123456, -456789)).toEqual(789123); }); test('Should return 0 for invalid input', () => { - expect(numeralWrapper.furthestFrom0('abc', undefined, null)).toEqual(0); + expect(numeralWrapper.largestAbsoluteNumber('abc', undefined, null)).toEqual(0); }); });