Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix firestore node tests #5741

Merged
merged 4 commits into from Dec 3, 2021
Merged

fix firestore node tests #5741

merged 4 commits into from Dec 3, 2021

Conversation

Feiyang1
Copy link
Member

@Feiyang1 Feiyang1 commented Nov 17, 2021

Use babel to compile tests for Node testing, so that import.meta.url can be compiled correctly.

@Feiyang1
Copy link
Member Author

fyi, @hsubox76

@changeset-bot
Copy link

changeset-bot bot commented Nov 17, 2021

🦋 Changeset detected

Latest commit: 623ede6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/firestore-compat Patch
@firebase/firestore Patch
firebase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-cla google-cla bot added the cla: yes label Nov 17, 2021
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 17, 2021

Binary Size Report

Affected SDKs

  • @firebase/app-compat

    Type Base (6f0049e) Head (9705213) Diff
    browser 5.28 kB 5.28 kB +1 B (+0.0%)
    esm5 6.13 kB 6.13 kB +1 B (+0.0%)
    lite 4.06 kB 4.06 kB +1 B (+0.0%)
    main 6.73 kB 6.73 kB +1 B (+0.0%)
    module 5.28 kB 5.28 kB +1 B (+0.0%)
  • @firebase/firestore

    Type Base (6f0049e) Head (9705213) Diff
    browser 225 kB 227 kB +2.04 kB (+0.9%)
    esm5 282 kB 284 kB +2.28 kB (+0.8%)
    main 423 kB 426 kB +3.02 kB (+0.7%)
    module 225 kB 227 kB +2.04 kB (+0.9%)
    react-native 226 kB 228 kB +2.04 kB (+0.9%)
  • @firebase/firestore-lite

    Type Base (6f0049e) Head (9705213) Diff
    browser 71.6 kB 72.4 kB +813 B (+1.1%)
    esm5 84.8 kB 85.7 kB +884 B (+1.0%)
    main 123 kB 125 kB +1.35 kB (+1.1%)
    module 71.6 kB 72.4 kB +813 B (+1.1%)
    react-native 71.8 kB 72.6 kB +821 B (+1.1%)
  • bundle

    Type Base (6f0049e) Head (9705213) Diff
    firestore (Query) 188 kB 190 kB +1.86 kB (+1.0%)
    firestore (Read data once) 193 kB 195 kB +1.89 kB (+1.0%)
    firestore (Realtime updates) 179 kB 180 kB +1.86 kB (+1.0%)
    firestore-lite (Query) 58.6 kB 59.4 kB +788 B (+1.3%)
    firestore-lite (Read data once) 56.4 kB 57.2 kB +788 B (+1.4%)
  • firebase

    Type Base (6f0049e) Head (9705213) Diff
    firebase-app-compat.js 17.9 kB 17.9 kB +1 B (+0.0%)
    firebase-compat.js 751 kB 753 kB +1.88 kB (+0.2%)
    firebase-firestore-compat.js 278 kB 280 kB +1.87 kB (+0.7%)
    firebase-firestore-lite.js 244 kB 245 kB +864 B (+0.4%)
    firebase-firestore.js 763 kB 766 kB +2.83 kB (+0.4%)
    firebase-performance-standalone-compat.es2017.js 78.9 kB 78.9 kB +1 B (+0.0%)
    firebase-performance-standalone-compat.js 57.0 kB 57.0 kB +1 B (+0.0%)

Test Logs

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 17, 2021

Size Analysis Report

Affected Products

Diffs between base commit (6f0049e) and head commit (9705213) are too large (244,990 characters) to display.

Please check below links to see details from the original test log.

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use this via the IntelliJ test runner but it failed with the following error:


✖ ERROR: /Users/mrschmidt/GitHub/firebase/firebase-js-sdk/packages/firestore/test/register.ts:18
import firebase from '@firebase/app-compat';
^^^^^^

SyntaxError: Cannot use import statement outside a module

The diff for the change:

https://paste.googleplex.com/6380219926577152

We really need to find a way to make Firestore run via ts-node, as this allows us to debug in the IDE.

@Feiyang1
Copy link
Member Author

Feiyang1 commented Nov 17, 2021

@schmidt-sebastian
I can debug tests fine with the new setup in the IDE. Are you not able to run tests at all?

@schmidt-sebastian
Copy link
Contributor

No, I am not able to. I will play around with this some more (but not sure if I can get to it today)

@Feiyang1 Feiyang1 merged commit 8298cf8 into master Dec 3, 2021
@Feiyang1 Feiyang1 deleted the fei-firestore-nodetest branch December 3, 2021 22:34
@google-oss-bot google-oss-bot mentioned this pull request Dec 7, 2021
@firebase firebase locked and limited conversation to collaborators Jan 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants