Skip to content

Commit 524bed6

Browse files
committed
moved build setup to tsconfig.build.ts (so the editor loads tests well),
changed js dialect to es19 & some fixes to the tests due to that
1 parent f04a0d4 commit 524bed6

File tree

4 files changed

+6
-39
lines changed

4 files changed

+6
-39
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"url": "https://github.com/hyperhyperspace/hyperhyperspace-core.git"
1313
},
1414
"scripts": {
15-
"build": "npx ttsc",
15+
"build": "npx ttsc --project tsconfig.build.json",
1616
"clean": "rm -rf ./dist/*",
1717
"winclean": "if exist dist (rmdir dist /s /q) && mkdir dist",
1818
"test": "npx jest"
@@ -52,7 +52,7 @@
5252
],
5353
"globals": {
5454
"ts-jest": {
55-
"tsconfig": "tsconfig.test.json"
55+
"tsconfig": "tsconfig.json"
5656
}
5757
}
5858
}

test/mesh/spaces/group.test.ts

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ import { SamplePeerSource } from '../types/SamplePeerSource';
77
import { MutableSet } from 'data/containers';
88
import { Logger, LogLevel } from 'util/logging';
99
import { PeerGroupAgent } from 'mesh/agents/peer';
10-
import { NetworkAgent } from 'mesh/agents/network';
1110
import { describeProxy } from 'config';
1211

1312
describeProxy('[SPA] Group shared spaces', () => {
1413

15-
connectSpaceWithLogger;
16-
14+
1715
test('[SPA01] 3-node sync test', async (done) => {
1816

1917
const size = 3;
@@ -211,35 +209,4 @@ let generateSpacesForPeers = (spaceId: string, samplePeers: Array<SamplePeer>) =
211209
}
212210

213211
return spaces;
214-
}
215-
216-
let connectSpaceWithLogger = (space: SharedNamespace, logger: Logger) => {
217-
218-
{
219-
let network = space.mesh.network as NetworkAgent;
220-
network;
221-
network.logger = logger;
222-
network.connLogger = logger;
223-
network.messageLogger = logger;
224-
225-
}
226-
227-
/*{
228-
let gossip = space.gossip as StateGossipAgent;
229-
gossip;
230-
gossip.controlLog = logger;
231-
gossip.peerMessageLog = logger;
232-
}
233-
234-
{
235-
let peerMesh = space.peerMesh as PeerMeshAgent;
236-
peerMesh;
237-
peerMesh.controlLog = logger;
238-
}*/
239-
240-
space.connect();
241-
242-
243-
244-
245212
}

tsconfig.test.json renamed to tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"paths": {
5-
"*": ["./src/*", "./test/*", "./examples/*"]
5+
"*": ["./src/*"]
66
},
77
},
88
}

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/* Basic Options */
66
"incremental": true, /* Enable incremental compilation */
7-
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
7+
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
88
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
99
"lib": ["dom", "esnext"], /* Specify library files to be included in the compilation. */
1010
// "allowJs": true, /* Allow javascript files to be compiled. */
@@ -44,7 +44,7 @@
4444
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
4545
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
4646
"paths": {
47-
"*": ["./src/*"]
47+
"*": ["./src/*", "./test/*", "./examples/*"]
4848
}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
4949
//"rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
5050
// "typeRoots": [ "./types", "./node_modules/@types" ], /* List of folders to include type definitions from. */

0 commit comments

Comments
 (0)