Skip to content

Commit d6d2aaf

Browse files
committed
First pass at getting fdc tests to work
1 parent d16a487 commit d6d2aaf

File tree

16 files changed

+100
-1078
lines changed

16 files changed

+100
-1078
lines changed

.github/workflows/test-firebase-integration.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ env:
2121
NODE_OPTIONS: "--max_old_space_size=4096"
2222

2323
jobs:
24+
services:
25+
postgres:
26+
image: postgres
27+
env:
28+
POSTGRES_PASSWORD: postgres
29+
options: >-
30+
--health-cmd pg_isready
31+
--health-interval 10s
32+
--health-timeout 5s
33+
--health-retries 5
2434
test:
2535
name: Test Firebase Namespace
2636
runs-on: ubuntu-latest
@@ -46,4 +56,4 @@ jobs:
4656
- name: build
4757
run: yarn build:changed firebase-integration
4858
- name: Run tests on changed packages
49-
run: yarn test:changed firebase-integration
59+
run: yarn test:changed firebase-integration

packages/data-connect/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
"prettier": "prettier --write '*.js' '*.ts' '@(src|test)/**/*.ts'",
3232
"build:deps": "lerna run --scope @firebase/'{app,data-connect}' --include-dependencies build",
3333
"dev": "rollup -c -w",
34-
"test": "run-p --npm-path npm test:emulator",
34+
"test": "run-p --npm-path npm lint test:emulator",
3535
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:emulator",
36-
"test:all": "run-p --npm-path npm lint test:unit",
36+
"test:all": "run-p --npm-path npm lint test:browser test:node",
3737
"test:browser": "karma start --single-run",
3838
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
3939
"test:unit": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/unit/**/*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",

packages/data-connect/src/api/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export function queryRef<Data, Variables>(
124124
dataConnect: dcInstance,
125125
refType: QUERY_STR,
126126
name: queryName,
127-
variables: variables
127+
variables
128128
};
129129
}
130130
/**

packages/data-connect/src/network/transport/rest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ export class RESTTransport implements DataConnectTransport {
166166
body: U
167167
) => {
168168
const abortController = new AbortController();
169+
169170
// TODO(mtewani): Update to proper value
170171
const withAuth = this.withRetry(() =>
171172
dcFetch<T, U>(

packages/data-connect/test/dataconnect/.dataconnect/schema/main/input.gql

Lines changed: 0 additions & 49 deletions
This file was deleted.

packages/data-connect/test/dataconnect/.dataconnect/schema/main/mutation.gql

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/data-connect/test/dataconnect/.dataconnect/schema/main/query.gql

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)