Commit Graph

66 Commits

Author SHA1 Message Date
JP Sugarbroad
01529a8347 fix typing conflict between jest and cypress
Cypress and Jest both define "expect", but they come from different
libraries (Cypress uses Chai, Jest uses its own thing). So we can't
include both of them in the tsconfig.json. Conveniently, however, we
don't need any of the test code to be part of the main project, so
it suffices to give these things their own tsconfig.json files.

That being done, adding "jest" to the global types lets us remove all
those imports.
2022-05-10 22:26:54 -07:00
hydroflame
c5bc47abf0
Revert "MISC: fix typing conflict between jest and cypress" 2022-05-04 12:14:31 -04:00
JP Sugarbroad
6b7be9f87b fix typing conflict between jest and cypress
Cypress and Jest both define "expect", but they come from different
libraries (Cypress uses Chai, Jest uses its own thing). So we can't
include both of them in the tsconfig.json. Conveniently, however, we
don't need any of the test code to be part of the main project, so
it suffices to give cypress its own tsconfig.json file.

That being done, adding "jest" to the global types lets us remove all
those imports.
2022-04-25 22:10:27 -07:00
Olivier Gagnon
de05245e2a lint 2022-04-22 17:31:46 -04:00
TheMas3212
68ddf1d588
Fix test/jest/Netscript/DynamicRamCalculation.test.js 2022-04-15 01:12:05 +10:00
Olivier Gagnon
8958046421 fix test 2022-04-12 14:06:24 -04:00
Olivier Gagnon
7d4bf90b40 fmtlinttest 2022-04-06 20:18:25 -04:00
hydroflame
b6d68f7353
Merge branch 'dev' into bugfix/fix-tests 2022-04-06 20:16:51 -04:00
Olivier Gagnon
8ae23937fb fix a few test 2022-04-06 19:58:06 -04:00
Olivier Gagnon
48f80f25d6 fmt and lint 2022-04-06 19:30:08 -04:00
phyzical
18af3f8413 moved updateRam to first call to avoid lack of mocks for tests
* added wrapper funcs to simplify updateRam
* added static parser tests and skiped what isnt worker still for next person to try and fix
2022-03-31 21:41:19 +08:00
Stephen Reindl
805480693c remove unnecessary space 2022-03-31 12:46:48 +02:00
Stephen Reindl
689059ea83 Fix expected ram calculation for ns.goToLocation() 2022-03-31 12:37:33 +02:00
Heinous Tugboat
9b0422f9ee Removes extra asterisk in template 2022-03-30 10:18:07 -04:00
Olivier Gagnon
fb7c65957d Added dark web functions to ns api 2022-03-20 22:49:46 -04:00
hydroflame
a980cb495f
Merge pull request #3150 from Master-Guy/issues/3080
Fixed number formatting and added tests
2022-03-20 14:23:16 -04:00
Master-Guy
bcb44c6a02
Removed un-used imports from tests 2022-03-19 16:23:10 +01:00
phyzical
44ea479043 update constants
* added OperationNames
* added faction names
* used citynames where appropriate
2022-03-19 16:09:59 +08:00
Master-Guy
1d07bf049f Changed the furthestFrom0() function + added tests 2022-03-18 09:30:25 +01:00
Master-Guy
90fd496a24 Fixed number formatting and added tests 2022-03-17 12:47:27 +01:00
BB
7212cc2f1c Removed unnecessary eslint-disable lines 2022-03-01 17:33:27 +01:00
Martin Fournier
8e119b2b5b Move cypress & netscript tests to ./test subfolder 2022-01-26 05:35:21 -05:00
Martin Fournier
aae3851d59 Add webpack file-loader to handle images
It lets us bundle static files such as images.

Allows us to `imports img from "./img.png"` to retrieve an image's path.
Note that we'll have to add other entries in the global.d.ts file if we
want to handle other extensions than .png.

Adds mocks to Jest tests so that we don't fail tests when loading static
assets.
2022-01-20 18:41:48 -05:00
Jeffrey A. Robinson
c9391130f4 Add Test 2022-01-14 19:32:44 -08:00
Martin Fournier
4b06bdd89c Add detailed ram cost to mem command 2022-01-05 16:41:48 -05:00
Woody Lam
f4080ee615
Fix #2344 tests failing due to SF4 2022-01-05 13:45:20 +00:00
Olivier Gagnon
c59a267437 change sf4 2022-01-04 19:09:34 -05:00
Martin Fournier
99f1e67224 Fix tests by passing args to dynamic function test
Function purchaseServer would throw with null arguments
2021-12-20 17:37:56 -05:00
Martin Fournier
2bbb767575 Fix remaining unit test issues 2021-12-19 15:42:40 -05:00
Martin Fournier
92e8b42d18 Fix renamed functions from 1.0 release in tests 2021-12-19 12:37:42 -05:00
Martin Fournier
d1696148c4 Fix tests syntax for jest
Most tests could not run with jest because of syntax difference between
the old test runner.
2021-12-19 12:37:42 -05:00
Olivier Gagnon
3112dc60c0 few more bugfixes 2021-11-11 23:28:08 -05:00
Olivier Gagnon
aa07ea981a saving timebomb 2021-11-11 20:42:19 -05:00
Olivier Gagnon
e245c2d3a7 fixed a few things 2021-10-14 02:07:05 -04:00
Olivier Gagnon
06f716c0fa moved a bunch of files 2021-09-25 14:42:57 -04:00
Olivier Gagnon
1883bea906 one big container ready 2021-09-17 02:31:19 -04:00
hydroflame
7e8e9e03fc
Revert "Jest cypress types" 2021-09-10 00:13:03 -04:00
David Edmondson
3473fc2ea6 Revert "fix tests"
This reverts commit 82c3362adca6c5b9499654586566ccfadf943e6a.
2021-09-08 22:13:46 -07:00
David Edmondson
0c0adf29d5 Separate src, test, cypress 2021-09-08 22:12:23 -07:00
Olivier Gagnon
2a13db39c7 fix sleeve memory bug 2021-09-08 23:47:34 -04:00
vmesecher
6979082be7 Adds getAugmentationPrice() and getAugmentationReqRep() Netscript Singularity functions. Deprecates getAugmentationCost() Netscript singularity function. 2021-09-07 20:33:34 -07:00
Olivier Gagnon
82c3362adc fix tests 2021-09-07 14:31:47 -04:00
Olivier Gagnon
a18bdd6afc prettify, sorry for the big ass commit 2021-09-04 19:09:30 -04:00
David Edmondson
ed035a2e89 Add tests for autocomplete 2021-08-30 17:58:01 -07:00
David Edmondson
ab4863e7df Swap out mocha/chai for jest 2021-08-26 16:43:11 -07:00
David Edmondson
1a8bcf66cc Fix existing tests, update to jest 2021-08-26 16:43:03 -07:00
Olivier Gagnon
4d9439a007 Added getServerMaxRam and getServerUsedRam, deprecated getServerRam 2021-05-03 01:07:46 -04:00
Olivier Gagnon
5a45e3584d Formatted time in netscript hgw display in human time, milliFormat now displays milli sometimes 2021-05-02 01:04:49 -04:00
Olivier Gagnon
d745150c45 all the lints 2021-05-01 03:17:31 -04:00
Olivier Gagnon
3fad505096 run auto fix lint 2021-04-29 23:52:56 -04:00