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

String formatted timestamps are not correctly detected during import #437

Open
ajbarry opened this issue Jun 12, 2020 · 0 comments · May be fixed by #438
Open

String formatted timestamps are not correctly detected during import #437

ajbarry opened this issue Jun 12, 2020 · 0 comments · May be fixed by #438

Comments

@ajbarry
Copy link

ajbarry commented Jun 12, 2020

Expected behavior

  describe("unserializeSpecialTypes", () => {
    before(() => {
      admin.initializeApp();
    });

    it("should convert parsable date string timestamps", () => {
      const dateStringTypes = {
        iso8601: {
          __datatype__: "timestamp",
          value: "2020-06-01T04:59:03-07:00"
        }
      };

      const results = unserializeSpecialTypes(dateStringTypes);
      expect(results.iso8601).to.be.an.instanceof(admin.firestore.Timestamp);
    });
  });

Actual behavior

Helpers
       unserializeSpecialTypes
         should convert parsable date string timestamps:
     Error: Value for argument "seconds" is not a valid integer.

Steps to reproduce the behavior

Attempt to import a Date.parse()-able timestamp value.

@ajbarry ajbarry linked a pull request Jun 12, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant