mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
Removed un-used imports from tests
This commit is contained in:
parent
3f1f275581
commit
bcb44c6a02
@ -1,5 +1,4 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
import { jest, describe, expect } from "@jest/globals";
|
||||||
import { jest, describe, expect, test } from "@jest/globals";
|
|
||||||
|
|
||||||
import { Player } from "../../../src/Player";
|
import { Player } from "../../../src/Player";
|
||||||
import { NetscriptFunctions } from "../../../src/NetscriptFunctions";
|
import { NetscriptFunctions } from "../../../src/NetscriptFunctions";
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
import { describe, expect, test } from "@jest/globals";
|
||||||
import { jest, describe, expect, test } from "@jest/globals";
|
|
||||||
import { numeralWrapper } from "../../../src/ui/numeralFormat";
|
import { numeralWrapper } from "../../../src/ui/numeralFormat";
|
||||||
|
|
||||||
let decimalFormat = '0.[000000]';
|
let decimalFormat = '0.[000000]';
|
||||||
@ -221,28 +220,28 @@ describe('Numeral formatting of scientific text', () => {
|
|||||||
|
|
||||||
describe('Finding the number furthest away from 0', () => {
|
describe('Finding the number furthest away from 0', () => {
|
||||||
test('should work if all numbers are equal', () => {
|
test('should work if all numbers are equal', () => {
|
||||||
expect(numeralWrapper.furthestFrom0(0, 0, 0)).toEqual(0);
|
expect(numeralWrapper.largestAbsoluteNumber(0, 0, 0)).toEqual(0);
|
||||||
expect(numeralWrapper.furthestFrom0(1, 1, 1)).toEqual(1);
|
expect(numeralWrapper.largestAbsoluteNumber(1, 1, 1)).toEqual(1);
|
||||||
expect(numeralWrapper.furthestFrom0(123, 123, 123)).toEqual(123);
|
expect(numeralWrapper.largestAbsoluteNumber(123, 123, 123)).toEqual(123);
|
||||||
expect(numeralWrapper.furthestFrom0(-1, -1, -1)).toEqual(-1);
|
expect(numeralWrapper.largestAbsoluteNumber(-1, -1, -1)).toEqual(-1);
|
||||||
expect(numeralWrapper.furthestFrom0(-123, -123, -123)).toEqual(-123);
|
expect(numeralWrapper.largestAbsoluteNumber(-123, -123, -123)).toEqual(-123);
|
||||||
});
|
});
|
||||||
test('should work for different positive numbers, and for the largest number in each spot', () => {
|
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.largestAbsoluteNumber(1, 2, 3)).toEqual(3);
|
||||||
expect(numeralWrapper.furthestFrom0(456, 789, 123)).toEqual(789);
|
expect(numeralWrapper.largestAbsoluteNumber(456, 789, 123)).toEqual(789);
|
||||||
expect(numeralWrapper.furthestFrom0(789123, 123456, 456789)).toEqual(789123);
|
expect(numeralWrapper.largestAbsoluteNumber(789123, 123456, 456789)).toEqual(789123);
|
||||||
});
|
});
|
||||||
test('should work for different negative numbers, and for the smallest number in each spot', () => {
|
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.largestAbsoluteNumber(-1, -2, -3)).toEqual(-3);
|
||||||
expect(numeralWrapper.furthestFrom0(-456, -789, -123)).toEqual(-789);
|
expect(numeralWrapper.largestAbsoluteNumber(-456, -789, -123)).toEqual(-789);
|
||||||
expect(numeralWrapper.furthestFrom0(-789123, -123456, -456789)).toEqual(-789123);
|
expect(numeralWrapper.largestAbsoluteNumber(-789123, -123456, -456789)).toEqual(-789123);
|
||||||
});
|
});
|
||||||
test('should work for combined positive and negative numbers', () => {
|
test('should work for combined positive and negative numbers', () => {
|
||||||
expect(numeralWrapper.furthestFrom0(1, -2, 3)).toEqual(3);
|
expect(numeralWrapper.largestAbsoluteNumber(1, -2, 3)).toEqual(3);
|
||||||
expect(numeralWrapper.furthestFrom0(-456, 789, -123)).toEqual(789);
|
expect(numeralWrapper.largestAbsoluteNumber(-456, 789, -123)).toEqual(789);
|
||||||
expect(numeralWrapper.furthestFrom0(789123, -123456, -456789)).toEqual(789123);
|
expect(numeralWrapper.largestAbsoluteNumber(789123, -123456, -456789)).toEqual(789123);
|
||||||
});
|
});
|
||||||
test('Should return 0 for invalid input', () => {
|
test('Should return 0 for invalid input', () => {
|
||||||
expect(numeralWrapper.furthestFrom0('abc', undefined, null)).toEqual(0);
|
expect(numeralWrapper.largestAbsoluteNumber('abc', undefined, null)).toEqual(0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user