Skip to content

Commit cdead75

Browse files
connection hub tests + updates + connection state fixes (#34)
* initial hub connection tests * minor changes * rename hub * add test doc + move mocks + several renaming * reuse connectionBuilder + backend mock support for reusability connection + * change retry spec name * add test for should stop retrying * desiredState + fix cancel reconnect on disconnect * add spec for disconnection reconnect * remove error logs stacktraces + merge options extract + getData rename * setData - should reconnect * expect data to be merged * spys moved * split tests * remove unused import * setData - should not connect spec + refactor to use more withLatestFrom instead of switchMap * install tslint ts plugin * update build but revert to rollup + change index exports * sync with ngx.command - ci, version, docs, tslib * add more keywords * add todos + add reconnect, disconnect test case * fix issue when connecting and disconnects while connecting * minor formatting cleanup * add test during connection, disconnects and fails should be disconnected * implement dispose * add todos, some cleanup, use dispose in tests * cleanup * change dispose to use disconnect * add test ci config * update version * disable no-consecutive-blank-lines for specs * update changelog + update others formatting * tsconfig reformatted
1 parent 0fcf9e9 commit cdead75

36 files changed

+1352
-824
lines changed

Diff for: .circleci/config.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jobs:
33
build:
44
working_directory: ~/repo
55
docker:
6-
- image: circleci/node:10.4
6+
- image: circleci/node:10.15.1
77
steps:
88
- run:
99
name: Print environment versions
@@ -20,12 +20,15 @@ jobs:
2020
- run:
2121
name: Lint
2222
command: npm run lint
23+
- run:
24+
name: Prebuild
25+
command: ./node_modules/.bin/gulp prebuild:rel
2326
- run:
2427
name: Build
2528
command: npm run build -- --rel
2629
- run:
2730
name: Test
28-
command: npm test
31+
command: npm test -- --ci --runInBand --passWithNoTests
2932
- deploy:
3033
name: Publish NPM
3134
command: |
@@ -34,11 +37,11 @@ jobs:
3437
exit
3538
fi
3639
. ./.circleci/utils.sh
37-
40+
3841
PACKAGE_VERSION=$(node -p "require('./package.json').version")
39-
42+
4043
print_title "publish..."
41-
npm publish
44+
npm run publish:rel
4245
4346
print_title "git tag"
4447
git tag $PACKAGE_VERSION

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ node_modules
44
*.tgz
55

66
_artifact
7+
coverage
78
dist
89
.rpt2_*
9-
.rts2_*
10+
.rts2_*

Diff for: .npmignore

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ tslint.json
3131
typings.json
3232
wallaby.js
3333
yarn.lock
34+
ng-package.json
35+
ng-package.js
3436
CODEOWNERS
3537
/tsconfig.json
3638
/tsconfig.build.json

Diff for: .vscode/launch.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
// Use IntelliSense to learn about possible Node.js debug attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Jest - Debug Current File",
11+
"program": "${workspaceRoot}\\node_modules\\jest\\bin\\jest.js",
12+
"args": [
13+
"--runInBand",
14+
"--testPathPattern",
15+
"${fileBasenameNoExtension}"
16+
// "--env",
17+
// "jest-environment-node-debug"
18+
],
19+
"internalConsoleOptions": "openOnSessionStart",
20+
"outFiles": [
21+
"${workspaceRoot}/dist/**/*"
22+
]
23+
},
24+
{
25+
"type": "node",
26+
"request": "launch",
27+
"name": "Jest - Debug Tests",
28+
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
29+
"args": [
30+
"--runInBand"
31+
]
32+
}
33+
]
34+
}

Diff for: .vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules\\typescript\\lib"
3+
}

0 commit comments

Comments
 (0)