Move cypress & netscript tests to ./test subfolder

This commit is contained in:
Martin Fournier 2022-01-25 16:24:09 -05:00
parent f943e55e86
commit 8e119b2b5b
24 changed files with 53 additions and 50 deletions

@ -1,27 +1,26 @@
node_modules/
dist/
input/
.dist
.tmp
.package
assets/
css/
.build
.cypress/
cypress/
dist/
input/
assets/
doc/
markdown/
netscript_tests/
tools/engines-check/
test/netscript/
electron/lib
electron/greenworks.js
src/ThirdParty/*
src/JSInterpreter.js
tools/engines-check/
test/*.bundle.*
editor.main.js
main.bundle.js
webpack.config.js
webpack.config-test.js

@ -1,10 +1,14 @@
{
"baseUrl": "http://localhost:8000",
"fixturesFolder": false,
"trashAssetsBeforeRuns": true,
"screenshotsFolder": ".cypress/screenshots",
"videosFolder": ".cypress/videos",
"videoUploadOnPasses": false,
"viewportWidth": 1980,
"viewportHeight": 1080
"viewportHeight": 1080,
"fixturesFolder": "test/cypress/fixtures",
"integrationFolder": "test/cypress/integration",
"pluginsFile": "test/cypress/plugins/index.js",
"supportFile": "test/cypress/support/index.js",
"screenshotsFolder": ".cypress/screenshots",
"videosFolder": ".cypress/videos",
"downloadsFolder": ".cypress/downloads"
}

@ -1,13 +1,13 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { jest, describe, expect, test } from "@jest/globals";
import { Player } from "../../src/Player";
import { NetscriptFunctions } from "../../src/NetscriptFunctions";
import { getRamCost, RamCostConstants } from "../../src/Netscript/RamCostGenerator";
import { Environment } from "../../src/Netscript/Environment";
import { RunningScript } from "../../src/Script/RunningScript";
import { Script } from "../../src/Script/Script";
import { SourceFileFlags } from "../../src/SourceFile/SourceFileFlags";
import { Player } from "../../../src/Player";
import { NetscriptFunctions } from "../../../src/NetscriptFunctions";
import { getRamCost, RamCostConstants } from "../../../src/Netscript/RamCostGenerator";
import { Environment } from "../../../src/Netscript/Environment";
import { RunningScript } from "../../../src/Script/RunningScript";
import { Script } from "../../../src/Script/Script";
import { SourceFileFlags } from "../../../src/SourceFile/SourceFileFlags";
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
virtual: true,

@ -1,9 +1,9 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
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";
import { Player } from "../../../src/Player";
import { getRamCost, RamCostConstants } from "../../../src/Netscript/RamCostGenerator";
import { calculateRamUsage } from "../../../src/Script/RamCalculations";
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
virtual: true,

@ -1,8 +1,8 @@
// 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";
import { Script } from "../../../src/Script/Script";
import { Player } from "../../../src/Player";
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
virtual: true,

@ -1,25 +1,25 @@
// 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";
import { CONSTANTS } from "../../src/Constants";
import { Player } from "../../src/Player";
import { IMap } from "../../src/types";
import { Company } from "../src/Company/Company";
import { Server } from "../src/Server/Server";
import { Company } from "../../src/Company/Company";
import { Server } from "../../src/Server/Server";
import { buyStock, sellStock, shortStock, sellShort } from "../src/StockMarket/BuyingAndSelling";
import { IStockMarket } from "../src/StockMarket/IStockMarket";
import { Order } from "../src/StockMarket/Order";
import { buyStock, sellStock, shortStock, sellShort } from "../../src/StockMarket/BuyingAndSelling";
import { IStockMarket } from "../../src/StockMarket/IStockMarket";
import { Order } from "../../src/StockMarket/Order";
import {
forecastForecastChangeFromCompanyWork,
forecastForecastChangeFromHack,
influenceStockThroughCompanyWork,
influenceStockThroughServerGrow,
influenceStockThroughServerHack,
} from "../src/StockMarket/PlayerInfluencing";
import { processOrders, IProcessOrderRefs } from "../src/StockMarket/OrderProcessing";
import { Stock, StockForecastInfluenceLimit } from "../src/StockMarket/Stock";
} from "../../src/StockMarket/PlayerInfluencing";
import { processOrders, IProcessOrderRefs } from "../../src/StockMarket/OrderProcessing";
import { Stock, StockForecastInfluenceLimit } from "../../src/StockMarket/Stock";
import {
cancelOrder,
deleteStockMarket,
@ -29,15 +29,15 @@ import {
processStockPrices,
StockMarket,
SymbolToStockMap,
} from "../src/StockMarket/StockMarket";
} from "../../src/StockMarket/StockMarket";
import {
forecastChangePerPriceMovement,
getBuyTransactionCost,
getSellTransactionGain,
processTransactionForecastMovement,
} from "../src/StockMarket/StockMarketHelpers";
import { OrderTypes } from "../src/StockMarket/data/OrderTypes";
import { PositionTypes } from "../src/StockMarket/data/PositionTypes";
} from "../../src/StockMarket/StockMarketHelpers";
import { OrderTypes } from "../../src/StockMarket/data/OrderTypes";
import { PositionTypes } from "../../src/StockMarket/data/PositionTypes";
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => '', {
virtual: true,

@ -1,6 +1,6 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { jest, describe, expect, test } from '@jest/globals'
import { convertTimeMsToTimeElapsedString } from "../src/utils/StringHelperFunctions";
import { convertTimeMsToTimeElapsedString } from "../../src/utils/StringHelperFunctions";
describe("StringHelperFunctions Tests", function () {
it("transforms strings", () => {

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

@ -2,12 +2,12 @@
// 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";
import { Server } from "../../src/Server/Server";
import { AddToAllServers, prestigeAllServers } from "../../src/Server/AllServers";
import { LocationName } from "../../src/Locations/data/LocationNames";
import { CodingContract } from "../../src/CodingContracts";
import { Player } from "../../../src/Player";
import { determineAllPossibilitiesForTabCompletion } from "../../../src/Terminal/determineAllPossibilitiesForTabCompletion";
import { Server } from "../../../src/Server/Server";
import { AddToAllServers, prestigeAllServers } from "../../../src/Server/AllServers";
import { LocationName } from "../../../src/Locations/data/LocationNames";
import { CodingContract } from "../../../src/CodingContracts";
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
virtual: true,