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

upgrade jest and move jest dependency to root package.json #12

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

fpauer
Copy link
Contributor

@fpauer fpauer commented Nov 24, 2021

Overview

Upgrade jest to v26 and move related-table jest dependencies to root package

Tests

rm -rf node_modules && rm -rf packages/components/node_modules && rm -rf packages/core/node_modules && rm -rf packages/related-table/node_modules

yarn install && yarn test

Results

$ lerna run test --stream --concurrency 1
@iot-app-kit/core: $ npm-run-all -p test:unit-test lint test:typescript
@iot-app-kit/core: $ yarn run lint:stylelint
@iot-app-kit/core: $ TZ=UTC stencil test --spec --coverage
@iot-app-kit/core: $ tsc --noEmit
@iot-app-kit/core: $ stylelint 'src/**/*.css' --max-warnings 0
@iot-app-kit/core: [30:00.3]  @stencil/core
@iot-app-kit/core: [30:00.5]  v2.11.0 🐌
@iot-app-kit/core: [30:00.7]  testing spec files
@iot-app-kit/core: [30:00.7]  jest args: --coverage --spec --max-workers=8
@iot-app-kit/core: PASS src/data-module/data-cache/requestRange.spec.ts
@iot-app-kit/core: PASS src/data-module/data-cache/dataReducer.spec.ts
@iot-app-kit/core: PASS src/data-module/data-cache/caching/caching.spec.ts
@iot-app-kit/core: PASS src/common/intervalStructure.spec.ts
@iot-app-kit/core: PASS src/data-module/data-cache/caching/expiredCacheIntervals.spec.ts
@iot-app-kit/core: PASS src/data-sources/site-wise/client/client.spec.ts
@iot-app-kit/core: PASS src/data-sources/site-wise/data-source.spec.ts
@iot-app-kit/core: PASS src/data-module/data-cache/dataCacheWrapped.spec.ts
@iot-app-kit/core: PASS src/common/number.spec.ts
@iot-app-kit/core: PASS src/common/predicates.spec.ts
@iot-app-kit/core: PASS src/data-module/data-cache/shouldImmediatelyCallRequest.spec.ts
@iot-app-kit/core: PASS src/data-module/data-cache/bestStreamStore.spec.ts
@iot-app-kit/core: PASS src/asset-modules/sitewise/siteWiseAssetModule.spec.ts
@iot-app-kit/core: PASS src/asset-modules/sitewise/cache.spec.ts
@iot-app-kit/core: PASS src/data-module/data-cache/toDataStreams.spec.ts
@iot-app-kit/core: PASS src/common/dataFilters.spec.ts
@iot-app-kit/core: PASS src/common/time.spec.ts
@iot-app-kit/core: PASS src/asset-modules/sitewise/session.spec.ts
@iot-app-kit/core: PASS src/data-sources/site-wise/util/toDataPoint.spec.ts
@iot-app-kit/core: PASS src/data-module/subscription-store/subscriptionStore.spec.ts
@iot-app-kit/core: PASS src/data-module/data-source-store/dataSourceStore.spec.ts
@iot-app-kit/core: PASS src/data-module/request-scheduler/requestScheduler.spec.ts
@iot-app-kit/core: PASS src/data-module/data-cache/mergeHistoricalRequests.spec.ts
@iot-app-kit/core: PASS src/common/viewport.spec.ts
@iot-app-kit/core: PASS src/data-sources/site-wise/util/secondsSinceEpoch.spec.ts
@iot-app-kit/core: PASS src/data-sources/site-wise/util/dataStreamId.spec.ts
@iot-app-kit/core: PASS src/data-module/IotAppKitDataModule.spec.ts (10.77 s)
@iot-app-kit/core: =============================== Coverage summary ===============================
@iot-app-kit/core: Statements   : 77.38% ( 811/1048 )
@iot-app-kit/core: Branches     : 62.14% ( 284/457 )
@iot-app-kit/core: Functions    : 75.1% ( 187/249 )
@iot-app-kit/core: Lines        : 78.7% ( 739/939 )
@iot-app-kit/core: ================================================================================
@iot-app-kit/core: Test Suites: 27 passed, 27 total
@iot-app-kit/core: Tests:       1 skipped, 377 passed, 378 total
@iot-app-kit/core: Snapshots:   0 total
@iot-app-kit/core: Time:        14.414 s
@iot-app-kit/core: Ran all test suites.
@iot-app-kit/related-table: warning package.json: License should be a valid SPDX license expression
@iot-app-kit/related-table: $ yarn run lint && jest
@iot-app-kit/related-table: warning package.json: License should be a valid SPDX license expression
@iot-app-kit/related-table: $ eslint src --max-warnings=2
@iot-app-kit/related-table: /Volumes/workplace/iot-app-kit/packages/related-table/src/RelatedTable/Common/TreeLines.tsx
@iot-app-kit/related-table:   56:14  warning  Do not use Array index in keys  react/no-array-index-key
@iot-app-kit/related-table: /Volumes/workplace/iot-app-kit/packages/related-table/src/utils/build.ts
@iot-app-kit/related-table:   23:6  warning  Assignment to property of function parameter 'node'  no-param-reassign
@iot-app-kit/related-table: ✖ 2 problems (0 errors, 2 warnings)
@iot-app-kit/related-table: PASS src/utils/utils.test.ts
@iot-app-kit/related-table: PASS src/Model/TreeNode.test.ts
@iot-app-kit/related-table: PASS src/Hooks/useTreeCollection.test.ts
@iot-app-kit/related-table: PASS src/RelatedTable/RelatedTable.test.tsx
@iot-app-kit/related-table: --------------------------|---------|----------|---------|---------|---------------------
@iot-app-kit/related-table: File                      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s   
@iot-app-kit/related-table: --------------------------|---------|----------|---------|---------|---------------------
@iot-app-kit/related-table: All files                 |   98.29 |    88.88 |   93.47 |   98.29 |                     
@iot-app-kit/related-table:  config/jest              |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:   styleMock.js            |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:  src                      |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:   config.ts               |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:  src/Hooks                |   94.56 |       75 |      80 |   94.56 |                     
@iot-app-kit/related-table:   useTreeCollection.ts    |   94.56 |       75 |      80 |   94.56 | 78-82               
@iot-app-kit/related-table:  src/Model                |   98.31 |     91.3 |   93.33 |   98.31 |                     
@iot-app-kit/related-table:   TreeNode.ts             |   98.31 |     91.3 |   93.33 |   98.31 | 74-75               
@iot-app-kit/related-table:  src/RelatedTable         |     100 |    76.19 |   83.33 |     100 |                     
@iot-app-kit/related-table:   ButtonWithTreeLines.tsx |     100 |    84.61 |   66.66 |     100 | 14-15               
@iot-app-kit/related-table:   RelatedTable.tsx        |     100 |     62.5 |     100 |     100 | 13,21               
@iot-app-kit/related-table:  src/RelatedTable/Common  |   97.19 |    83.67 |     100 |   97.19 |                     
@iot-app-kit/related-table:   StyledComponents.tsx    |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:   TreeLines.tsx           |   96.73 |    81.81 |     100 |   96.73 | 136-137,139-140,142 
@iot-app-kit/related-table:  src/utils                |     100 |    97.14 |     100 |     100 |                     
@iot-app-kit/related-table:   build.ts                |     100 |     92.3 |     100 |     100 | 12,49               
@iot-app-kit/related-table:   cleanup.ts              |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:   expand.ts               |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:   filter.ts               |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:   flat.ts                 |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:   index.ts                |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table:   sort.ts                 |     100 |      100 |     100 |     100 |                     
@iot-app-kit/related-table: --------------------------|---------|----------|---------|---------|---------------------
@iot-app-kit/related-table: Test Suites: 4 passed, 4 total
@iot-app-kit/related-table: Tests:       15 passed, 15 total
@iot-app-kit/related-table: Snapshots:   0 total
@iot-app-kit/related-table: Time:        4.369 s
@iot-app-kit/related-table: Ran all test suites.
@iot-app-kit/components: $ stencil test --spec
@iot-app-kit/components: [30:31.4]  @stencil/core
@iot-app-kit/components: [30:31.8]  v2.11.0 🐌
@iot-app-kit/components: [30:32.0]  testing spec files
@iot-app-kit/components: [30:32.0]  jest args: --spec --max-workers=8
@iot-app-kit/components: PASS src/testing/dataStreamId.spec.ts
@iot-app-kit/components: PASS src/components/iot-bar-chart/iot-bar-chart.spec.ts
@iot-app-kit/components: PASS src/components/iot-line-chart/iot-line-chart.spec.ts (5.932 s)
@iot-app-kit/components: PASS src/components/iot-status-grid/iot-status-grid.spec.ts (5.958 s)
@iot-app-kit/components: PASS src/components/iot-scatter-chart/iot-scatter-chart.spec.ts (5.838 s)
@iot-app-kit/components: PASS src/components/iot-table/iot-table.spec.ts (5.938 s)
@iot-app-kit/components: PASS src/components/iot-status-timeline/iot-status-timeline.spec.ts (5.915 s)
@iot-app-kit/components: PASS src/components/iot-connector/iot-connector.spec.ts (5.989 s)
@iot-app-kit/components: PASS src/components/iot-kpi/iot-kpi.spec.ts (5.961 s)
@iot-app-kit/components: A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks.
@iot-app-kit/components: Test Suites: 9 passed, 9 total
@iot-app-kit/components: Tests:       13 passed, 13 total
@iot-app-kit/components: Snapshots:   0 total
@iot-app-kit/components: Time:        7.801 s
@iot-app-kit/components: Ran all test suites.
lerna success run Ran npm script 'test' in 3 packages in 41.6s:
lerna success - @iot-app-kit/components
lerna success - @iot-app-kit/core
lerna success - @iot-app-kit/related-table
✨  Done in 42.15s.

Legal

This project is available under the Apache 2.0 License.

@fpauer fpauer requested a review from NorbertNader November 24, 2021 17:32
@fpauer fpauer merged commit f0dd4fd into main Nov 24, 2021
@diehbria diehbria deleted the upgrade-jest-move-root branch May 5, 2022 16:27
sheilaXu added a commit that referenced this pull request Sep 23, 2022
* Release 1.2.1 (#85)

* fix: unsubrscribe data provider on component updates

* Release 1.2.1

Co-authored-by: Norbert Nader <nnader@amazon.com>

* fix: resolves #83 (#87)

* fix: resolves #83

* Update index.ts

Co-authored-by: Norbert Nader <nnader@amazon.com>

* feat: improve documentation (#90)

* Run tests on pull request (#91)

* Update reference to code name (#86)

AWS-UI internal code name is mentioned in the readme.

Co-authored-by: Norbert Nader <Norbert.Nader@gmail.com>

* feat: update synchro charts to 3.1.0, update docs (#92)

* feat: Improve documentation formatting (#93)

* feat: Improve resource explorer docs (#95)

* Update README.md (#94)

* feat: support fetchMostRecentBeforeStart (#79)

* Update documentation & make react-components easier to use (#98)

* Utilize lock file in CI (#99)

* build(deps): bump async from 2.6.3 to 2.6.4 (#100)

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: support auto-assigning colors for certain components (#96)

* feat: support auto-assigning colors for certain components

* Update package.json

* Update cypress to v9, added stricted linting, fixed linting warnings and errors (#104)

* Add stylelint and enforce via global package.json (#106)

* use most recent synchro-charts version, 4.0.1 (#111)

* build(deps): bump eventsource from 1.1.0 to 1.1.1 (#116)

Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](EventSource/eventsource@v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: expand children in resource explorer (#115)

* feat: expand children in resource explorer

* fix typo

* Fix asset module cache

* Add logic for fetching hierarchies

* Add tests

* Improve insert

* Fix linting

Co-authored-by: Norbert Nader <nnader@amazon.com>

* Update README.md (#121)

Fix test runner status badge

* Bump minor version (#120)

* specify react types package version to be 17 (#134)

Co-authored-by: Xinyi <xinyxu@amazon.com>

* build(deps): bump parse-url from 6.0.0 to 6.0.2 (#142)

Bumps [parse-url](https://github.com/IonicaBizau/parse-url) from 6.0.0 to 6.0.2.
- [Release notes](https://github.com/IonicaBizau/parse-url/releases)
- [Commits](https://github.com/IonicaBizau/parse-url/commits)

---
updated-dependencies:
- dependency-name: parse-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: Norbert Nader <Norbert.Nader@gmail.com>
Co-authored-by: Norbert Nader <nnader@amazon.com>
Co-authored-by: db <77755322+diehbria@users.noreply.github.com>
Co-authored-by: Mitchell Lee <mitch@evildev.net>
Co-authored-by: Bowei Han <boweih@amazon.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xinyi Xu <sheilaxxy@gmail.com>
Co-authored-by: Xinyi <xinyxu@amazon.com>
TheEvilDev pushed a commit that referenced this pull request Nov 2, 2022
Co-authored-by: Fernando Pauer <pauerf@amazon.com>
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 this pull request may close these issues.

2 participants