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: Check property existence for exclude from indexes with wildcard #1114

Commits on May 24, 2023

  1. Add a test for testing without mocks

    Testing without mocks allows us to look at the code how it is functioning right now so that we can evaluate the intended behavior.
    danieljbruce committed May 24, 2023
    Configuration menu
    Copy the full SHA
    e02139b View commit details
    Browse the repository at this point in the history
  2. Do a refactor on the test

    Objects shared by both tests should be moved into the outer block so that they can be shared.
    danieljbruce committed May 24, 2023
    Configuration menu
    Copy the full SHA
    f139770 View commit details
    Browse the repository at this point in the history
  3. improve the test so that the error bubbles up

    Now the test fails properly and passes properly by introducing callbacks
    danieljbruce committed May 24, 2023
    Configuration menu
    Copy the full SHA
    c8dd740 View commit details
    Browse the repository at this point in the history
  4. isolate the latter test right now

    The failure should be visible to the user and in the current state it is so now by isolating the test it becomes easier to explore solutions that work.
    danieljbruce committed May 24, 2023
    Configuration menu
    Copy the full SHA
    bdbe4c7 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2023

  1. test fixes

    indent a describe block, modify tests to make sure they pass and refactor a function out that easily allows for testing modified parameters.
    danieljbruce committed May 26, 2023
    Configuration menu
    Copy the full SHA
    24975b1 View commit details
    Browse the repository at this point in the history
  2. Add two more tests for excludeFromIndexes on array

    Add two more tests that address the array case for excludeIndexesFromPath. Also ensure that the conditions which check for these test cases properly ignore exclude from indexes when an array is used
    danieljbruce committed May 26, 2023
    Configuration menu
    Copy the full SHA
    d129b17 View commit details
    Browse the repository at this point in the history
  3. Move the tests over to the index file

    We should not create a nomocks file because we can just group the tests under a unique describe block of test/index.ts.
    danieljbruce committed May 26, 2023
    Configuration menu
    Copy the full SHA
    860afcb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    099e8ef View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. Configuration menu
    Copy the full SHA
    73cb4f1 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' of https://github.com/googleapis/nodejs-datastore

    …into check-property-existence-for-excludeFromIndexes-with-wildcard
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    1b19906 View commit details
    Browse the repository at this point in the history
  3. PR update

    Remove typeof and remove check for string ‘undefined’
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    be6b20e View commit details
    Browse the repository at this point in the history
  4. Merge branch 'check-property-existence-for-excludeFromIndexes-with-wi…

    …ldcard' of https://github.com/danieljbruce/nodejs-datastore into check-property-existence-for-excludeFromIndexes-with-wildcard
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    87a3f80 View commit details
    Browse the repository at this point in the history
  5. Create a function to refactor the tests

    Refactor the tests so that they are more readable. There is a lot of repeated code in each test which makes comparisons hard.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    f0900e6 View commit details
    Browse the repository at this point in the history
  6. All tests for this feature now use same script

    Replace all tests exercising the feature so that they all use the same test script. This will make the tests way easier to read.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    3e1fa90 View commit details
    Browse the repository at this point in the history
  7. Add parameterized testing

    Add parameterized testing to eliminate repeated code. These tests need to be easier to read for the sake of the reviewer.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    e43a1c3 View commit details
    Browse the repository at this point in the history
  8. Eliminate function and inline code

    This function is only used once now. We should inline this code in the test.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    b21bd99 View commit details
    Browse the repository at this point in the history
  9. Add JSON stringify to test title

    In the test title include the properties passed in so that it is easy to track what passed/failed.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    234f501 View commit details
    Browse the repository at this point in the history
  10. Organize code so that similar variables are used

    Similar variables should be used together. Organize the code so that there is less confusion about which variables are related.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    17a5f2d View commit details
    Browse the repository at this point in the history
  11. inline getExpectedConfig function

    The getExpectedConfig does not need to be used anymore because its code can just be inlined in the one place it is used.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    aedf0c9 View commit details
    Browse the repository at this point in the history
  12. Separate tests into blocks and inline code

    Separate the test into blocks and inline some parameters for better test readability.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    af1130f View commit details
    Browse the repository at this point in the history
  13. Add types to parameters passed into async

    Stronger typing makes the code easier to read.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    b127359 View commit details
    Browse the repository at this point in the history
  14. Eliminate unnecessary variable assignment

    Don’t assign to the Datastore variable. This is not necessary. Just use the OriginalDatastore variable directly.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    66d0a37 View commit details
    Browse the repository at this point in the history
  15. Ran linter and simplified source changes

    The diff will be easier to read if we do not add a nested if statement and instead apply a condition on the if and change the else to else if.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    94d7a24 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d9da7da View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    0cd7cbc View commit details
    Browse the repository at this point in the history
  18. Additional adjustment to entity first path part

    Apply the first suggestion in the PR to all examples
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    377770b View commit details
    Browse the repository at this point in the history
  19. Define isFirstPathPartUndefined

    There is a repeated code fragment for checking if the first path part is undefined that we should refactor.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    df3f376 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    4f54d94 View commit details
    Browse the repository at this point in the history
  21. run linter

    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    a101f27 View commit details
    Browse the repository at this point in the history
  22. Revert "run linter"

    This reverts commit a101f27.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    2253740 View commit details
    Browse the repository at this point in the history
  23. Revert "Rename the variable to align with what it does"

    This reverts commit 4f54d94.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    8db651a View commit details
    Browse the repository at this point in the history
  24. Revert "Define isFirstPathPartUndefined"

    This reverts commit df3f376.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    b798ec3 View commit details
    Browse the repository at this point in the history
  25. Refactor check out for seeing if defined

    We do four checks to see if the first path part is defined. We should refactor these checks out.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    3133879 View commit details
    Browse the repository at this point in the history
  26. Move comment to more appropriate place

    The comment should reflect the next line of code.
    danieljbruce committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    b148c95 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. Merge branch 'main' of https://github.com/googleapis/nodejs-datastore

    …into check-property-existence-for-excludeFromIndexes-with-wildcard
    
    # Conflicts:
    #	test/index.ts
    danieljbruce committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    e0dfef3 View commit details
    Browse the repository at this point in the history
  2. Replace comments with description

    Replace comments with description property so that the tests will report the description when running the tests instead of the properties in the description.
    danieljbruce committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    d1ff7d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    620ee00 View commit details
    Browse the repository at this point in the history
  4. fix typo

    danieljbruce committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    e0d770f View commit details
    Browse the repository at this point in the history
  5. lowercase convention

    danieljbruce committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    e1aecb6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d75a732 View commit details
    Browse the repository at this point in the history