fix: migrate tests to V7#14776
Closed
osama-rizk wants to merge 27 commits into
Closed
Conversation
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.23 to 4.18.1. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.23...4.18.1) --- updated-dependencies: - dependency-name: lodash dependency-version: 4.18.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Remove duplicate test 'should include expectedBucketOwner for PUT with path' - Improve JSDoc on method field explaining PUT vs GET behavior - Add tests for credential expiration and expiresIn for PUT method
|
fb3e3a8 to
7d6f244
Compare
Member
|
I think we can close this in favor of #14786 wdyt? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Migrates all test and source files to the V7
AmplifyContextpattern, replacing the removedAmplifysingleton.
Changes applied across all packages:
Amplify.configure(),Amplify.getConfig(),Amplify.Auth.fetchAuthSession()) withAmplifyContext— config and auth methods now live directly onthe context object
fn(input)→fn(ctx, input)to pass context as first argumentAmplify,AmplifyClassV6,GraphQLAPI,generateClientWithAmplifyInstance,getAmplifyServerContextcreateMockAmplifyContext()helper (__tests__/testUtils/mockAmplifyContext.ts) to 11 packages:analytics, api, api-graphql, api-rest, datastore, datastore-storage-adapter, geo, interactions,
notifications, predictions, pubsub, storage
Tests relocated (adapter-core logic moved to
aws-amplify):adapter-nextjsaws-amplify/adapterCoreorigin.test.tsorigin.test.tsserializeCookie.test.tscookie/serializeCookie.test.tsensureEncodedForJSCookie.test.tscreateTokenValidator.test.tscreateTokenValidator.test.tsglobalSettings.test.tsglobalSettings.test.tsisValidCognitoToken.test.tsisValidCognitoToken.test.tsTests deleted (modules removed in V7):
aws-amplify/__tests__/initSingleton.test.ts—Amplifysingleton no longer existsapi-graphql/__tests__/internals/server/generateClientWithAmplifyInstance.test.ts— server clientfactory removed
api-rest/__tests__/server.test.ts— server REST APIs removedstorage/__tests__/providers/s3/apis/server/(5 files) — server storage APIs removedTests added:
adapter-express/__tests__/utils/createCookieStorageAdapterFromExpressContext.test.tsaws-amplify/__tests__/adapterCore/createServerRunner.test.tsIssue #, if available
Part of V7 AmplifyContext migration (
poc/bobbor/v7)Description of how you validated changes
npx jest --no-coveragein each package individually — all suites passnpx eslinton packages with source changes — lint cleanChecklist
yarn testpassesadded
Checklist for repo maintainers
workflows
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0
license.