aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.41k stars 2.12k forks source link

Tests failing on master #4612

Closed ericclemmons closed 4 years ago

ericclemmons commented 4 years ago

Describe the bug

...it seems the unit tests for the BigInteger change are not passing. CircleCI doesn’t seem to run these tests https://github.com/aws-amplify/amplify-js/blob/master/.circleci/config.yml#L45-L57. It’s failing in my local with the master changes – @Amplifiyer

Here's what CI is running:

https://github.com/aws-amplify/amplify-js/blob/8a78b6077bed1975893deda741fc1775a3f6e2a7/.circleci/config.yml#L45-L57

Oddly enough, #4520 added tests that worked within the scope of that PR, but CI was likely passing because it didn't run the tests with the rest of the changes.

If the fix is simple, I'll address it. If the fix is not (e.g. transitive dependency issues), I'll back out the test/build changes & keep #4422 & #4427.

To Reproduce Steps to reproduce the behavior:

  1. Go to master
  2. yarn test
  3. See error

Expected behavior

Tests should pass in both CI & locally.

Environment ``` npx envinfo --system --binaries --browsers --npmPackages --npmGlobalPackages ```
ericclemmons commented 4 years ago

Capturing the errors I see here:

amplify-vue:
aws-amplify-vue:       ---> <Authenticator>
aws-amplify-vue:              <Root>
aws-amplify-vue:     console.error ../../node_modules/vue/dist/vue.runtime.common.dev.js:1884
aws-amplify-vue:       TypeError: Cannot read property 'then' of undefined
aws-amplify-vue:           at VueComponent.mounted (/Users/ecclemm/Projects/ericclemmons/amplify-js/packages/aws-amplify-vue/src/components/authenticator/Authenticator.vue:1224:43)
aws-amplify-vue:           at invokeWithErrorHandling (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:1850:57)
aws-amplify-vue:           at callHook (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:4207:7)
aws-amplify-vue:           at Object.insert (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:3133:7)
aws-amplify-vue:           at invokeInsertHook (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:6326:28)
aws-amplify-vue:           at VueComponent.patch [as __patch__] (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:6543:5)
aws-amplify-vue:           at VueComponent.Vue._update (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:3933:19)
aws-amplify-vue:           at VueComponent.updateComponent (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:4054:10)
aws-amplify-vue:           at Watcher.get (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:4465:25)
aws-amplify-vue:           at new Watcher (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:4454:12)
aws-amplify-vue:           at mountComponent (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:4061:3)
aws-amplify-vue:           at VueComponent.Object.<anonymous>.Vue.$mount (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/vue/dist/vue.runtime.common.dev.js:8392:10)
aws-amplify-vue:           at mount (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/@vue/test-utils/dist/vue-test-utils.js:8649:21)
aws-amplify-vue:           at shallowMount (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/@vue/test-utils/dist/vue-test-utils.js:8677:10)
aws-amplify-vue:           at Object.<anonymous> (/Users/ecclemm/Projects/ericclemmons/amplify-js/packages/aws-amplify-vue/__tests__/Authenticator.test.js:32:14)
aws-amplify-vue:           at Object.asyncJestLifecycle (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/@vue/cli-plugin-unit-jest/node_modules/jest-jasmine2/build/jasmine_async.js:63:37)
aws-amplify-vue:           at /Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/@vue/cli-plugin-unit-jest/node_modules/jest-jasmine2/build/queue_runner.js:56:12
aws-amplify-vue:           at new Promise (<anonymous>)
aws-amplify-vue:           at mapper (/Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/@vue/cli-plugin-unit-jest/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
aws-amplify-vue:           at /Users/ecclemm/Projects/ericclemmons/amplify-js/node_modules/@vue/cli-plugin-unit-jest/node_modules/jest-jasmine2/build/queue_runner.js:87:41
aws-amplify-vue:           at processTicksAndRejections (internal/process/task_queues.js:93:5)
aws-amplify-vue: PASS __tests__/S3Image.test.js
aws-amplify-vue:   ● Console
aws-amplify-vue:     console.error ../../node_modules/vue/dist/vue.runtime.common.dev.js:621
aws-amplify-vue:       [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "imagePath"
aws-amplify-vue:
aws-amplify-vue:       found in
aws-amplify-vue:
aws-amplify-vue:       ---> <S3Image>
aws-amplify-vue:              <Root>
aws-amplify-vue: PASS __tests__/S3Album.test.js
aws-amplify-vue: PASS __tests__/SumerianScene.test.js
aws-amplify-vue: PASS __tests__/Connect.test.js
aws-amplify-vue: PASS __tests__/GetUser.test.js
aws-amplify-vue: PASS __tests__/PhoneField.test.js
aws-amplify-vue: PASS __tests__/Amplify.test.js
aws-amplify-vue: PASS __tests__/AmplifyPlugin.test.js
aws-amplify-vue: =============================== Coverage summary ===============================
aws-amplify-vue: Statements   : 60.95% ( 412/676 )
aws-amplify-vue: Branches     : 55.59% ( 174/313 )
aws-amplify-vue: Functions    : 56.03% ( 65/116 )
aws-amplify-vue: Lines        : 60.95% ( 412/676 )
aws-amplify-vue: ================================================================================
aws-amplify-vue: Test Suites: 20 passed, 20 total
aws-amplify-vue: Tests:       248 passed, 248 total
aws-amplify-vue: Snapshots:   0 total
aws-amplify-vue: Time:        16.976s
aws-amplify-vue: Ran all test suites.
@aws-amplify/core: PASS __tests__/Hub-test.ts (19.016s)
@aws-amplify/core:   ● Console
@aws-amplify/core:     console.warn src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [WARN] 21:25.984 Hub - WARNING onHubCapsule is Deprecated. Please pass in a callback.
@aws-amplify/core:     console.warn src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [WARN] 21:25.990 Hub - WARNING onHubCapsule is Deprecated. Please pass in a callback.
@aws-amplify/core:     console.warn src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [WARN] 21:25.993 Hub - WARNING: auth is protected and dispatching on it can have unintended consequences
@aws-amplify/core:     console.warn src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [WARN] 21:26.29 Hub - Cannot perform pattern matching without a message key
@aws-amplify/core: PASS __tests__/JS-test.ts
@aws-amplify/core: PASS __tests__/ServiceWorker-test.ts
@aws-amplify/core: PASS __tests__/Mutex-test.ts
@aws-amplify/core: PASS __tests__/Credentials-test.ts
@aws-amplify/core: PASS __tests__/I18n-test.ts
@aws-amplify/core: PASS __tests__/Signer-test.ts
@aws-amplify/core: PASS __tests__/Util-test.ts
@aws-amplify/core:   ● Console
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:29.780 Util -  attempt #1 with this vars: []
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:29.782 Util - error on : Error: fail
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:29.783 Util -  retrying in 223.79109642610908 ms
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:30.7 Util -  attempt #2 with this vars: []
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:30.8 Util - error on : Error: fail
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:30.8 Util -  retrying in 430.4747605866504 ms
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:30.442 Util -  attempt #3 with this vars: []
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:30.445 Util - mockConstructor attempt #1 with this vars: []
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:30.446 Util - error on mockConstructor: Error: fatal
@aws-amplify/core:     console.log src/Logger/ConsoleLogger.ts:2247
@aws-amplify/core:       [DEBUG] 21:30.448 Util - mockConstructor non retryable error Error: fatal
@aws-amplify/core: PASS __tests__/Amplify-test.ts
@aws-amplify/core: PASS __tests__/HubClass-test.ts
@aws-amplify/core: PASS __tests__/Platform-test.ts
@aws-amplify/core: -------------------|----------|----------|----------|----------|-------------------|
@aws-amplify/core: File               |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
@aws-amplify/core: -------------------|----------|----------|----------|----------|-------------------|
@aws-amplify/core: All files          |    66.37 |    56.07 |    62.37 |    66.54 |                   |
@aws-amplify/core:  src               |    67.64 |    62.09 |    68.13 |    68.02 |                   |
@aws-amplify/core:   Amplify.ts       |      100 |      100 |      100 |      100 |                   |
@aws-amplify/core:   Credentials.ts   |    31.63 |    28.05 |       32 |    32.99 |... 18,419,421,431 |
@aws-amplify/core:   Errors.ts        |       50 |      100 |        0 |       50 |             15,18 |
@aws-amplify/core:   Facet.ts         |      100 |      100 |      100 |      100 |                   |
@aws-amplify/core:   Hub.ts           |    82.05 |    76.47 |    83.33 |    83.56 |... 22,139,174,198 |
@aws-amplify/core:   JS.ts            |    86.46 |    95.59 |       75 |    87.78 |... 51,156,159,162 |
@aws-amplify/core:   Parser.ts        |       25 |        0 |       50 |       25 |... 49,54,55,56,57 |
@aws-amplify/core:   Signer.ts        |    95.58 |    67.86 |    95.65 |    95.37 |  45,71,81,102,174 |
@aws-amplify/core:   constants.ts     |      100 |      100 |      100 |      100 |                   |
@aws-amplify/core:   index.ts         |    91.11 |       25 |        0 |    86.67 |       49,51,52,54 |
@aws-amplify/core:  src/ClientDevice  |    16.67 |        0 |     12.5 |       18 |                   |
@aws-amplify/core:   browser.ts       |     8.51 |        0 |        0 |      9.3 |... 00,101,102,105 |
@aws-amplify/core:   index.ts         |    71.43 |      100 |    33.33 |    71.43 |             18,22 |
@aws-amplify/core:  src/I18n          |    79.07 |       70 |    58.82 |    79.27 |                   |
@aws-amplify/core:   I18n.ts          |    91.11 |    85.71 |       75 |    92.68 |        89,136,137 |
@aws-amplify/core:   index.ts         |    65.85 |    33.33 |    44.44 |    65.85 |... 12,116,117,120 |
@aws-amplify/core:  src/Logger        |    69.49 |       60 |    63.64 |    72.55 |                   |
@aws-amplify/core:   ConsoleLogger.ts |    68.97 |       60 |    63.64 |       72 |... 12,122,142,162 |
@aws-amplify/core:   index.ts         |      100 |      100 |      100 |      100 |                   |
@aws-amplify/core:  src/OAuthHelper   |    35.64 |       15 |    33.33 |    36.08 |                   |
@aws-amplify/core:   FacebookOAuth.ts |    32.61 |    11.76 |     37.5 |    34.09 |... 74,75,76,77,79 |
@aws-amplify/core:   GoogleOAuth.ts   |    30.61 |    17.39 |       30 |    31.25 |... 78,83,86,90,91 |
@aws-amplify/core:   index.ts         |      100 |      100 |      100 |      100 |                   |
@aws-amplify/core:  src/Platform      |    76.92 |       60 |      100 |    76.92 |                   |
@aws-amplify/core:   index.ts         |    76.92 |       60 |      100 |    76.92 |          26,27,28 |
@aws-amplify/core:  src/RNComponents  |    88.89 |       50 |        0 |    85.71 |                   |
@aws-amplify/core:   index.ts         |    88.89 |       50 |        0 |    85.71 |                20 |
@aws-amplify/core:  src/ServiceWorker |    89.04 |    71.43 |    76.47 |    87.69 |                   |
@aws-amplify/core:   ServiceWorker.ts |    88.73 |    71.43 |    76.47 |     87.5 |... 90,191,192,201 |
@aws-amplify/core:   index.ts         |      100 |      100 |      100 |      100 |                   |
@aws-amplify/core:  src/StorageHelper |    69.57 |        0 |       50 |    68.18 |                   |
@aws-amplify/core:   index.ts         |    69.57 |        0 |       50 |    68.18 |... 36,47,55,56,72 |
@aws-amplify/core:  src/Util          |    85.23 |    73.91 |    78.26 |     85.9 |                   |
@aws-amplify/core:   Mutex.ts         |      100 |      100 |      100 |      100 |                   |
@aws-amplify/core:   Reachability.ts  |    26.67 |      100 |    16.67 |    30.77 |... 15,16,18,19,20 |
@aws-amplify/core:   Retry.ts         |    94.87 |    68.42 |      100 |    94.12 |             28,53 |
@aws-amplify/core:   index.ts         |      100 |      100 |      100 |      100 |                   |
@aws-amplify/core: -------------------|----------|----------|----------|----------|-------------------|
@aws-amplify/core: Test Suites: 11 passed, 11 total
@aws-amplify/core: Tests:       4 skipped, 80 passed, 84 total
@aws-amplify/core: Snapshots:   0 total
@aws-amplify/core: Time:        26.213s
@aws-amplify/core: Ran all test suites.
@aws-amplify/interactions: $ tslint 'src/**/*.ts' && jest -w 1 --coverage
@aws-amplify/cache: $ tslint 'src/**/*.ts' && jest -w 1 --coverage
@aws-amplify/storage: $ tslint 'src/**/*.ts' && jest -w 1 --coverage
@aws-amplify/pushnotification: $ jest -w 1 --coverage --passWithNoTests
@aws-amplify/pushnotification: No tests found
@aws-amplify/pushnotification: In /Users/ecclemm/Projects/ericclemmons/amplify-js/packages/pushnotification
@aws-amplify/pushnotification:   5 files checked.
@aws-amplify/pushnotification:   testMatch:  - 5 matches
@aws-amplify/pushnotification:   testPathIgnorePatterns: /node_modules/ - 5 matches
@aws-amplify/pushnotification:   testRegex: (/__tests__/.*|\.(test|spec))\.(tsx?|jsx?)$ - 0 matches
@aws-amplify/pushnotification: Pattern:  - 0 matches
@aws-amplify/pushnotification: ----------|----------|----------|----------|----------|-------------------|
@aws-amplify/pushnotification: File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
@aws-amplify/pushnotification: ----------|----------|----------|----------|----------|-------------------|
@aws-amplify/pushnotification: All files |  Unknown |  Unknown |  Unknown |  Unknown |                   |
@aws-amplify/pushnotification: ----------|----------|----------|----------|----------|-------------------|
@aws-amplify/xr: $ tslint 'src/**/*.ts' && jest -w 1 --coverage
@aws-amplify/cache: [BABEL] Note: The code generator has deoptimised the styling of /Users/ecclemm/Projects/ericclemmons/amplify-js/packages/core/dist/aws-amplify-core.js as it exceeds the max of 500KB.
@aws-amplify/interactions: [BABEL] Note: The code generator has deoptimised the styling of /Users/ecclemm/Projects/ericclemmons/amplify-js/packages/core/dist/aws-amplify-core.js as it exceeds the max of 500KB.
@aws-amplify/xr: [BABEL] Note: The code generator has deoptimised the styling of /Users/ecclemm/Projects/ericclemmons/amplify-js/packages/core/dist/aws-amplify-core.js as it exceeds the max of 500KB.
@aws-amplify/storage: [BABEL] Note: The code generator has deoptimised the styling of /Users/ecclemm/Projects/ericclemmons/amplify-js/packages/core/dist/aws-amplify-core.js as it exceeds the max of 500KB.
@aws-amplify/interactions: FAIL __tests__/Interactions-unit-test.ts (32.517s)
@aws-amplify/interactions:   Interactions
@aws-amplify/interactions:     constructor test
@aws-amplify/interactions:       ✓ happy case (1ms)
@aws-amplify/interactions:     configure test
@aws-amplify/interactions:       ✓ happy case (31ms)
@aws-amplify/interactions:       ✕ aws-exports configuration and send message to existing bot (10ms)
@aws-amplify/interactions:       ✕ aws-exports configuration with two bots and send message to existing bot (9ms)
@aws-amplify/interactions:       ✕ Interactions configuration with two bots and send message to existing bot and fullfil (37ms)
@aws-amplify/interactions:       Sending messages to bot
@aws-amplify/interactions:         ✕ Interactions configuration and send message to existing bot and call onComplete from Interaction.onComplete (4ms)
@aws-amplify/interactions:         ✕ Interactions configuration and send message to existing bot and call onComplete from configure onComplete (4ms)
@aws-amplify/interactions:         ✓ aws-exports configuration and send message to not existing bot (1ms)
@aws-amplify/interactions:         ✓ aws-exports configuration and try to add onComplete to not existing bot (1ms)
@aws-amplify/interactions:       Adding pluggins
@aws-amplify/interactions:         ✓ Adding AWSLexProvider2 bot not found
@aws-amplify/interactions:         ✕ Adding custom pluggin happy path (1ms)
@aws-amplify/interactions:   ● Interactions › configure test › aws-exports configuration and send message to existing bot
@aws-amplify/interactions:     TypeError: Cannot read property 'config' of undefined
@aws-amplify/interactions:       at AWSLexProvider.<anonymous> (src/Providers/AWSLexProvider.ts:5222:26)
@aws-amplify/interactions:       at step (src/Providers/AWSLexProvider.ts:4878:19)
@aws-amplify/interactions:       at Object.next (src/Providers/AWSLexProvider.ts:4608:14)
@aws-amplify/interactions:       at fulfilled (src/Providers/AWSLexProvider.ts:4495:24)
@aws-amplify/interactions:   ● Interactions › configure test › aws-exports configuration with two bots and send message to existing bot
@aws-amplify/interactions:     TypeError: Cannot read property 'config' of undefined
@aws-amplify/interactions:       at AWSLexProvider.<anonymous> (src/Providers/AWSLexProvider.ts:5222:26)
@aws-amplify/interactions:       at step (src/Providers/AWSLexProvider.ts:4878:19)
@aws-amplify/interactions:       at Object.next (src/Providers/AWSLexProvider.ts:4608:14)
@aws-amplify/interactions:       at fulfilled (src/Providers/AWSLexProvider.ts:4495:24)
@aws-amplify/interactions:   ● Interactions › configure test › Interactions configuration with two bots and send message to existing bot and fullfil
@aws-amplify/interactions:     TypeError: Cannot read property 'config' of undefined
@aws-amplify/interactions:       at AWSLexProvider.<anonymous> (src/Providers/AWSLexProvider.ts:5222:26)
@aws-amplify/interactions:       at step (src/Providers/AWSLexProvider.ts:4878:19)
@aws-amplify/interactions:       at Object.next (src/Providers/AWSLexProvider.ts:4608:14)
@aws-amplify/interactions:       at fulfilled (src/Providers/AWSLexProvider.ts:4495:24)
@aws-amplify/interactions:   ● Interactions › configure test › Sending messages to bot › Interactions configuration and send message to existing bot and call onComplete from Interaction.onComplete
@aws-amplify/interactions:     TypeError: Cannot read property 'config' of undefined
@aws-amplify/interactions:       at AWSLexProvider.<anonymous> (src/Providers/AWSLexProvider.ts:5222:26)
@aws-amplify/interactions:       at step (src/Providers/AWSLexProvider.ts:4878:19)
@aws-amplify/interactions:       at Object.next (src/Providers/AWSLexProvider.ts:4608:14)
@aws-amplify/interactions:       at fulfilled (src/Providers/AWSLexProvider.ts:4495:24)
@aws-amplify/interactions:   ● Interactions › configure test › Sending messages to bot › Interactions configuration and send message to existing bot and call onComplete from configure onComplete
@aws-amplify/interactions:     TypeError: Cannot read property 'config' of undefined
@aws-amplify/interactions:       at AWSLexProvider.<anonymous> (src/Providers/AWSLexProvider.ts:5222:26)
@aws-amplify/interactions:       at step (src/Providers/AWSLexProvider.ts:4878:19)
@aws-amplify/interactions:       at Object.next (src/Providers/AWSLexProvider.ts:4608:14)
@aws-amplify/interactions:       at fulfilled (src/Providers/AWSLexProvider.ts:4495:24)
@aws-amplify/interactions:   ● Interactions › configure test › Adding pluggins › Adding custom pluggin happy path
@aws-amplify/interactions:     TypeError: Cannot read property 'config' of undefined
@aws-amplify/interactions:       at AWSLexProvider2.<anonymous> (src/Providers/AWSLexProvider.ts:5222:26)
@aws-amplify/interactions:       at step (src/Providers/AWSLexProvider.ts:4878:19)
@aws-amplify/interactions:       at Object.next (src/Providers/AWSLexProvider.ts:4608:14)
@aws-amplify/interactions:       at fulfilled (src/Providers/AWSLexProvider.ts:4495:24)
@aws-amplify/interactions: --------------------------|----------|----------|----------|----------|-------------------|
@aws-amplify/interactions: File                      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
@aws-amplify/interactions: --------------------------|----------|----------|----------|----------|-------------------|
@aws-amplify/interactions: All files                 |    69.23 |    53.85 |    73.33 |    68.33 |                   |
@aws-amplify/interactions:  src                      |       90 |     82.5 |    90.91 |    91.67 |                   |
@aws-amplify/interactions:   Interactions.ts         |       90 |     82.5 |    90.91 |    91.67 |     40,90,106,123 |
@aws-amplify/interactions:  src/Providers            |    56.25 |    23.68 |    63.16 |    52.78 |                   |
@aws-amplify/interactions:   AWSLexProvider.ts       |    43.55 |    20.59 |       50 |    39.29 |... 49,151,152,160 |
@aws-amplify/interactions:   InteractionsProvider.ts |      100 |       50 |      100 |      100 |             28,32 |
@aws-amplify/interactions:   index.ts                |      100 |      100 |      100 |      100 |                   |
@aws-amplify/interactions: --------------------------|----------|----------|----------|----------|-------------------|
@aws-amplify/cache: PASS __tests__/BrowserStorageCache-unit-test.ts (21.865s)
@aws-amplify/cache:   ● Console
@aws-amplify/cache:     console.warn ../../node_modules/jest-environment-jsdom/node_modules/jest-mock/build/index.js:598
@aws-amplify/cache:       [WARN] 22:12.77 Cache - Item with key: b you are trying to put into is too big!
@aws-amplify/interactions: Test Suites: 1 failed, 1 total
@aws-amplify/interactions: Tests:       6 failed, 5 passed, 11 total
@aws-amplify/interactions: Snapshots:   0 total
@aws-amplify/interactions: Time:        35.788s
@aws-amplify/interactions: Ran all test suites.
@aws-amplify/interactions: error Command failed with exit code 1.
@aws-amplify/interactions: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run test exited 1 in '@aws-amplify/interactions'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Amplifiyer commented 4 years ago

@ericclemmons This is interesting, in my workspace, these tests are not even running and failing at the amazon-cognito-identity-js package. Tests for @aws-amplify/interactions are actually passing when run independently. Below is the entire log for yarn test from the root.

yarn run v1.16.0
$ lerna run test --stream
lerna notice cli v3.19.0
lerna info versioning independent
lerna info Executing command in 19 packages: "yarn run test"
@aws-amplify/ui: $ webpack
aws-amplify-react-native: $ jest -w 1 --passWithNoTests --coverage --maxWorkers 2
aws-amplify-vue: $ ./node_modules/.bin/vue-cli-service test:unit
amazon-cognito-identity-js: $ jest -w 1 --passWithNoTests
@aws-amplify/core: $ tslint 'src/**/*.ts' && jest -w 1 --coverage
aws-amplify-react-native: No tests found, exiting with code 0
aws-amplify-react-native: ----------|----------|----------|----------|----------|-------------------|
aws-amplify-react-native: File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
aws-amplify-react-native: ----------|----------|----------|----------|----------|-------------------|
aws-amplify-react-native: All files |        0 |        0 |        0 |        0 |                   |
aws-amplify-react-native: ----------|----------|----------|----------|----------|-------------------|
amazon-cognito-identity-js: PASS lib/BigInteger.test.js
amazon-cognito-identity-js: FAIL src/BigInteger.test.js
amazon-cognito-identity-js:   ● Test suite failed to run
amazon-cognito-identity-js:     /Users/pravgupt/Workspace/JS-Prod/fork/amplify-js/packages/amazon-cognito-identity-js/src/BigInteger.test.js:1
amazon-cognito-identity-js:     ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import BigInteger from './BigInteger';
amazon-cognito-identity-js:                                                                                                     ^^^^^^^^^^
amazon-cognito-identity-js:     SyntaxError: Unexpected identifier
amazon-cognito-identity-js:       at ScriptTransformer._transformAndBuildScript (../../node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
amazon-cognito-identity-js:       at ScriptTransformer.transform (../../node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
amazon-cognito-identity-js: FAIL es/BigInteger.test.js
amazon-cognito-identity-js:   ● Test suite failed to run
amazon-cognito-identity-js:     /Users/pravgupt/Workspace/JS-Prod/fork/amplify-js/packages/amazon-cognito-identity-js/es/BigInteger.test.js:1
amazon-cognito-identity-js:     ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import BigInteger from './BigInteger';
amazon-cognito-identity-js:                                                                                                     ^^^^^^^^^^
amazon-cognito-identity-js:     SyntaxError: Unexpected identifier
amazon-cognito-identity-js:       at ScriptTransformer._transformAndBuildScript (../../node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
amazon-cognito-identity-js:       at ScriptTransformer.transform (../../node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
amazon-cognito-identity-js: Test Suites: 2 failed, 1 passed, 3 total
amazon-cognito-identity-js: Tests:       2 passed, 2 total
amazon-cognito-identity-js: Snapshots:   0 total
amazon-cognito-identity-js: Time:        4.545s
amazon-cognito-identity-js: Ran all test suites.
amazon-cognito-identity-js: error Command failed with exit code 1.
amazon-cognito-identity-js: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run test exited 1 in 'amazon-cognito-identity-js'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
ericclemmons commented 4 years ago

@Amplifiyer Thanks for sharing this!

Doing the full yarn clean && yarn bootstrap && yarn test & now I'm getting the same results.

I'll have a fix for it shortly, & have theories why #4520 passed initially.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.