Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions firestore-bigquery-export/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## Version 0.2.8

chore: move test/build dependencies to devDependencies

chore: upgrade jest from 25 to 29.5.0 and ts-jest from 27 to 29.1.2

chore: remove unused jest-config dependency

chore: add minimatch override to resolve npm audit vulnerabilities

## Version 0.2.7

chore: bump dependencies
Expand Down
2 changes: 1 addition & 1 deletion firestore-bigquery-export/extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

name: firestore-bigquery-export
version: 0.2.7
version: 0.2.8
specVersion: v1beta

displayName: Stream Firestore to BigQuery
Expand Down
20 changes: 11 additions & 9 deletions firestore-bigquery-export/functions/__tests__/functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,16 @@ let restoreEnv;
let functionsTest;

/** Helper to Mock Export */
const mockExport = (document, data) => {
const mockExport = (change, context = {}) => {
const ref = require("../src/index").fsexportbigquery;
const wrapped = functionsTest.wrap(ref);
return wrapped(document, data);
return ref.run({
data: change,
document: "example/doc1",
id: "test-event-id",
time: new Date().toISOString(),
params: { documentId: "doc1" },
...context,
});
};

describe("extension", () => {
Expand Down Expand Up @@ -120,9 +126,7 @@ describe("extension", () => {
afterSnapshot
);

const callResult = await mockExport(documentChange, {
resource: { name: "example/doc1" },
});
const callResult = await mockExport(documentChange);

expect(callResult).toBeUndefined();

Expand Down Expand Up @@ -154,9 +158,7 @@ describe("extension", () => {
afterSnapshot
);

const callResult = await mockExport(documentChange, {
resource: { name: "example/doc1" },
});
const callResult = await mockExport(documentChange);

expect(callResult).toBeUndefined();

Expand Down
2 changes: 1 addition & 1 deletion firestore-bigquery-export/functions/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.test.json",
tsconfig: "<rootDir>/tsconfig.json",
},
],
},
Expand Down
Loading
Loading