Merge pull request #3644 from taralx/patch-1

MISC: fix typing conflict between jest and cypress
This commit is contained in:
hydroflame 2022-05-19 02:13:11 -04:00 committed by GitHub
commit 4c33ad444b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 24 additions and 25 deletions

@ -57,6 +57,7 @@
"@types/bcryptjs": "^2.4.2",
"@types/escodegen": "^0.0.7",
"@types/file-saver": "^2.0.3",
"@types/jest": "^27.4.1",
"@types/jquery": "^3.5.14",
"@types/lodash": "^4.14.168",
"@types/numeral": "^2.0.2",

@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"checkJs": true,
"types": ["cypress", "@testing-library/cypress"]
},
"include": ["**/*"],
"exclude": []
}

@ -1,5 +1,3 @@
import { jest, describe, expect } from "@jest/globals";
import { Player } from "../../../src/Player";
import { NetscriptFunctions } from "../../../src/NetscriptFunctions";
import { getRamCost, RamCostConstants } from "../../../src/Netscript/RamCostGenerator";

@ -1,5 +1,3 @@
import { jest, describe, expect } from "@jest/globals";
import { Player } from "../../../src/Player";
import { getRamCost, RamCostConstants } from "../../../src/Netscript/RamCostGenerator";
import { calculateRamUsage } from "../../../src/Script/RamCalculations";

@ -1,6 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { describe, expect, jest } from "@jest/globals";
// Player is needed for calculating costs like Singularity functions, that depend on acquired source files
import { Player } from "../../../src/Player";

@ -1,6 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { jest, describe, expect, test } from "@jest/globals";
import { Script } from "../../../src/Script/Script";
import { Player } from "../../../src/Player";

@ -1,6 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { jest, describe, expect, test } from "@jest/globals";
import { CONSTANTS } from "../../src/Constants";
import { Player } from "../../src/Player";
import { IMap } from "../../src/types";

@ -1,5 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { jest, describe, expect, test } from "@jest/globals";
import { convertTimeMsToTimeElapsedString } from "../../src/utils/StringHelperFunctions";
describe("StringHelperFunctions Tests", function () {

@ -1,5 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { jest, describe, expect, test } from "@jest/globals";
import * as dirHelpers from "../../../src/Terminal/DirectoryHelpers";
describe("Terminal Directory Tests", function () {

@ -1,7 +1,5 @@
import { CityName } from "./../../../src/Locations/data/CityNames";
/* eslint-disable no-await-in-loop */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { jest, describe, expect, test } from "@jest/globals";
import { Player } from "../../../src/Player";
import { determineAllPossibilitiesForTabCompletion } from "../../../src/Terminal/determineAllPossibilitiesForTabCompletion";

@ -1,4 +1,3 @@
import { describe, expect, test } from "@jest/globals";
import { numeralWrapper } from "../../../src/ui/numeralFormat";
let decimalFormat = "0.[000000]";

9
test/tsconfig.json Normal file

@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"allowJs": true,
"types": ["jest"]
},
"include": ["**/*", "../src/**/*.d.ts"],
"exclude": ["cypress/**/*"]
}

@ -4,13 +4,13 @@
"esModuleInterop": true,
"isolatedModules": true,
"jsx": "react",
"lib": ["es2016", "dom", "es2017.object", "es2019"],
"module": "commonjs",
"target": "es6",
"noEmit": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"resolveJsonModule": true,
"types": ["cypress", "@testing-library/cypress", "node"]
"target": "es2019"
},
"exclude": ["node_modules"]
"include": ["src/**/*"]
}