bitburner-src/test/jest
David Walker 1f2e69631e
EDITOR: Use ramOverride() to set compiled script RAM (#1446)
To use this, add a line like "ns.ramOverride(2);" as the first statement
in main(). Not only will it take effect at runtime, but it will now
*also* be parsed at compile time, changing the script's static RAM
limit. Since ns.ramOverride is a 0-cost function, the call to it on
startup then becomes a no-op.

This is an often-requested feature, and allows for scripts to set their
usage without it needing to be explicitly mentioned via args or options
when being launched. This also reduces pressure on the static RAM
analysis to be perfect all the time. (But certain limits, such as
"functions names must be unique across namespaces," remain.)

This also adds a tooltip to the RAM calculation, to make this slightly
discoverable.
2024-07-05 17:32:46 -07:00
..
__snapshots__ IPVGO: Support bonus cycles from offline time (#1345) 2024-06-04 18:43:29 -07:00
Alias TERMINAL: Prevent recursive aliases from being resolved. (#741) 2023-08-28 14:26:25 -04:00
Go IPVGO: Balance and improvements for offline bonus time cycles (#1356) 2024-06-05 19:39:22 -07:00
Imports Moved Player initialization point (#452) 2023-03-29 00:30:27 -04:00
Messages TESTS: Prevent some test spam (#1126) 2024-02-26 08:22:33 -05:00
Netscript EDITOR: Use ramOverride() to set compiled script RAM (#1446) 2024-07-05 17:32:46 -07:00
Script Fix test 2023-05-28 05:43:09 -04:00
Terminal v2.4.0 2023-07-30 22:08:36 -04:00
ui UI: Added new locale-aware and configurable number formatting (#354) 2023-02-11 13:18:50 -05:00
Corporation.test.ts CORPORATION: Rename functions in Actions.ts (#1272) 2024-05-12 14:52:07 -07:00
FullSave.test.ts MISC: Refactor favor code (#1321) 2024-05-28 12:04:16 -07:00
Grow.test.ts TESTS: Prevent some test spam (#1126) 2024-02-26 08:22:33 -05:00
README.md Move cypress & netscript tests to ./test subfolder 2022-01-26 05:35:21 -05:00
Save.test.ts UI: fix scripts recorded offline income (#1025) 2024-02-10 07:24:55 -05:00
StockMarket.test.ts Make grow formulas faster and more accurate. (#1044) 2024-01-31 19:27:31 -05:00
StringHelperFunctions.test.ts fix: fix StringHelperFunctions test 2022-09-23 18:13:33 -04:00

Unit Tests

This directory contains unit tests for Bitburner.

Unit tests use jest.

Running

Run tests with: npm run test

To watch for changes: npm run test:watch