mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-08 08:43:53 +01:00
Move cypress & netscript tests to ./test subfolder
This commit is contained in:
parent
f943e55e86
commit
8e119b2b5b
@ -1,27 +1,26 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
|
||||||
input/
|
|
||||||
|
|
||||||
.dist
|
.dist
|
||||||
.tmp
|
.tmp
|
||||||
.package
|
.package
|
||||||
|
.build
|
||||||
assets/
|
|
||||||
css/
|
|
||||||
.cypress/
|
.cypress/
|
||||||
cypress/
|
|
||||||
|
dist/
|
||||||
|
input/
|
||||||
|
assets/
|
||||||
doc/
|
doc/
|
||||||
markdown/
|
markdown/
|
||||||
netscript_tests/
|
|
||||||
tools/engines-check/
|
|
||||||
|
test/netscript/
|
||||||
|
|
||||||
electron/lib
|
electron/lib
|
||||||
electron/greenworks.js
|
electron/greenworks.js
|
||||||
src/ThirdParty/*
|
src/ThirdParty/*
|
||||||
src/JSInterpreter.js
|
src/JSInterpreter.js
|
||||||
|
tools/engines-check/
|
||||||
|
|
||||||
test/*.bundle.*
|
|
||||||
editor.main.js
|
editor.main.js
|
||||||
main.bundle.js
|
main.bundle.js
|
||||||
webpack.config.js
|
webpack.config.js
|
||||||
webpack.config-test.js
|
|
||||||
|
12
cypress.json
12
cypress.json
@ -1,10 +1,14 @@
|
|||||||
{
|
{
|
||||||
"baseUrl": "http://localhost:8000",
|
"baseUrl": "http://localhost:8000",
|
||||||
"fixturesFolder": false,
|
|
||||||
"trashAssetsBeforeRuns": true,
|
"trashAssetsBeforeRuns": true,
|
||||||
"screenshotsFolder": ".cypress/screenshots",
|
|
||||||
"videosFolder": ".cypress/videos",
|
|
||||||
"videoUploadOnPasses": false,
|
"videoUploadOnPasses": false,
|
||||||
"viewportWidth": 1980,
|
"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
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
import { jest, describe, expect, test } 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";
|
||||||
import { getRamCost, RamCostConstants } from "../../src/Netscript/RamCostGenerator";
|
import { getRamCost, RamCostConstants } from "../../../src/Netscript/RamCostGenerator";
|
||||||
import { Environment } from "../../src/Netscript/Environment";
|
import { Environment } from "../../../src/Netscript/Environment";
|
||||||
import { RunningScript } from "../../src/Script/RunningScript";
|
import { RunningScript } from "../../../src/Script/RunningScript";
|
||||||
import { Script } from "../../src/Script/Script";
|
import { Script } from "../../../src/Script/Script";
|
||||||
import { SourceFileFlags } from "../../src/SourceFile/SourceFileFlags";
|
import { SourceFileFlags } from "../../../src/SourceFile/SourceFileFlags";
|
||||||
|
|
||||||
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
|
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
|
||||||
virtual: true,
|
virtual: true,
|
@ -1,9 +1,9 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
import { jest, describe, expect } from "@jest/globals";
|
import { jest, describe, expect } from "@jest/globals";
|
||||||
|
|
||||||
import { Player } from "../../src/Player";
|
import { Player } from "../../../src/Player";
|
||||||
import { getRamCost, RamCostConstants } from "../../src/Netscript/RamCostGenerator";
|
import { getRamCost, RamCostConstants } from "../../../src/Netscript/RamCostGenerator";
|
||||||
import { calculateRamUsage } from "../../src/Script/RamCalculations";
|
import { calculateRamUsage } from "../../../src/Script/RamCalculations";
|
||||||
|
|
||||||
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
|
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
|
||||||
virtual: true,
|
virtual: true,
|
@ -1,8 +1,8 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
import { jest, describe, expect, test } from "@jest/globals";
|
import { jest, describe, expect, test } from "@jest/globals";
|
||||||
|
|
||||||
import { Script } from "../../src/Script/Script";
|
import { Script } from "../../../src/Script/Script";
|
||||||
import { Player } from "../../src/Player";
|
import { Player } from "../../../src/Player";
|
||||||
|
|
||||||
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
|
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
|
||||||
virtual: true,
|
virtual: true,
|
||||||
@ -26,4 +26,4 @@ describe("Validate Save Script Works", function () {
|
|||||||
expect(script.code).toEqual(code)
|
expect(script.code).toEqual(code)
|
||||||
expect(script.server).toEqual(server)
|
expect(script.server).toEqual(server)
|
||||||
});
|
});
|
||||||
});
|
});
|
@ -1,25 +1,25 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
import { jest, describe, expect, test } from '@jest/globals'
|
import { jest, describe, expect, test } from '@jest/globals'
|
||||||
|
|
||||||
import { CONSTANTS } from "../src/Constants";
|
import { CONSTANTS } from "../../src/Constants";
|
||||||
import { Player } from "../src/Player";
|
import { Player } from "../../src/Player";
|
||||||
import { IMap } from "../src/types";
|
import { IMap } from "../../src/types";
|
||||||
|
|
||||||
import { Company } from "../src/Company/Company";
|
import { Company } from "../../src/Company/Company";
|
||||||
import { Server } from "../src/Server/Server";
|
import { Server } from "../../src/Server/Server";
|
||||||
|
|
||||||
import { buyStock, sellStock, shortStock, sellShort } from "../src/StockMarket/BuyingAndSelling";
|
import { buyStock, sellStock, shortStock, sellShort } from "../../src/StockMarket/BuyingAndSelling";
|
||||||
import { IStockMarket } from "../src/StockMarket/IStockMarket";
|
import { IStockMarket } from "../../src/StockMarket/IStockMarket";
|
||||||
import { Order } from "../src/StockMarket/Order";
|
import { Order } from "../../src/StockMarket/Order";
|
||||||
import {
|
import {
|
||||||
forecastForecastChangeFromCompanyWork,
|
forecastForecastChangeFromCompanyWork,
|
||||||
forecastForecastChangeFromHack,
|
forecastForecastChangeFromHack,
|
||||||
influenceStockThroughCompanyWork,
|
influenceStockThroughCompanyWork,
|
||||||
influenceStockThroughServerGrow,
|
influenceStockThroughServerGrow,
|
||||||
influenceStockThroughServerHack,
|
influenceStockThroughServerHack,
|
||||||
} from "../src/StockMarket/PlayerInfluencing";
|
} from "../../src/StockMarket/PlayerInfluencing";
|
||||||
import { processOrders, IProcessOrderRefs } from "../src/StockMarket/OrderProcessing";
|
import { processOrders, IProcessOrderRefs } from "../../src/StockMarket/OrderProcessing";
|
||||||
import { Stock, StockForecastInfluenceLimit } from "../src/StockMarket/Stock";
|
import { Stock, StockForecastInfluenceLimit } from "../../src/StockMarket/Stock";
|
||||||
import {
|
import {
|
||||||
cancelOrder,
|
cancelOrder,
|
||||||
deleteStockMarket,
|
deleteStockMarket,
|
||||||
@ -29,15 +29,15 @@ import {
|
|||||||
processStockPrices,
|
processStockPrices,
|
||||||
StockMarket,
|
StockMarket,
|
||||||
SymbolToStockMap,
|
SymbolToStockMap,
|
||||||
} from "../src/StockMarket/StockMarket";
|
} from "../../src/StockMarket/StockMarket";
|
||||||
import {
|
import {
|
||||||
forecastChangePerPriceMovement,
|
forecastChangePerPriceMovement,
|
||||||
getBuyTransactionCost,
|
getBuyTransactionCost,
|
||||||
getSellTransactionGain,
|
getSellTransactionGain,
|
||||||
processTransactionForecastMovement,
|
processTransactionForecastMovement,
|
||||||
} from "../src/StockMarket/StockMarketHelpers";
|
} from "../../src/StockMarket/StockMarketHelpers";
|
||||||
import { OrderTypes } from "../src/StockMarket/data/OrderTypes";
|
import { OrderTypes } from "../../src/StockMarket/data/OrderTypes";
|
||||||
import { PositionTypes } from "../src/StockMarket/data/PositionTypes";
|
import { PositionTypes } from "../../src/StockMarket/data/PositionTypes";
|
||||||
|
|
||||||
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => '', {
|
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => '', {
|
||||||
virtual: true,
|
virtual: true,
|
@ -1,6 +1,6 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
import { jest, describe, expect, test } from '@jest/globals'
|
import { jest, describe, expect, test } from '@jest/globals'
|
||||||
import { convertTimeMsToTimeElapsedString } from "../src/utils/StringHelperFunctions";
|
import { convertTimeMsToTimeElapsedString } from "../../src/utils/StringHelperFunctions";
|
||||||
|
|
||||||
describe("StringHelperFunctions Tests", function () {
|
describe("StringHelperFunctions Tests", function () {
|
||||||
it("transforms strings", () => {
|
it("transforms strings", () => {
|
@ -1,6 +1,6 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
import { jest, describe, expect, test } from '@jest/globals'
|
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("Terminal Directory Tests", function () {
|
||||||
describe("removeLeadingSlash()", function () {
|
describe("removeLeadingSlash()", function () {
|
@ -2,12 +2,12 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
import { jest, describe, expect, test } from "@jest/globals";
|
import { jest, describe, expect, test } from "@jest/globals";
|
||||||
|
|
||||||
import { Player } from "../../src/Player";
|
import { Player } from "../../../src/Player";
|
||||||
import { determineAllPossibilitiesForTabCompletion } from "../../src/Terminal/determineAllPossibilitiesForTabCompletion";
|
import { determineAllPossibilitiesForTabCompletion } from "../../../src/Terminal/determineAllPossibilitiesForTabCompletion";
|
||||||
import { Server } from "../../src/Server/Server";
|
import { Server } from "../../../src/Server/Server";
|
||||||
import { AddToAllServers, prestigeAllServers } from "../../src/Server/AllServers";
|
import { AddToAllServers, prestigeAllServers } from "../../../src/Server/AllServers";
|
||||||
import { LocationName } from "../../src/Locations/data/LocationNames";
|
import { LocationName } from "../../../src/Locations/data/LocationNames";
|
||||||
import { CodingContract } from "../../src/CodingContracts";
|
import { CodingContract } from "../../../src/CodingContracts";
|
||||||
|
|
||||||
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
|
jest.mock(`!!raw-loader!../NetscriptDefinitions.d.ts`, () => "", {
|
||||||
virtual: true,
|
virtual: true,
|
Loading…
Reference in New Issue
Block a user