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

STCOR-551 configure karma for v6 compatibility #1081

Merged
merged 1 commit into from
Jun 9, 2021
Merged

STCOR-551 configure karma for v6 compatibility #1081

merged 1 commit into from
Jun 9, 2021

Conversation

zburke
Copy link
Member

@zburke zburke commented Jun 9, 2021

There are some overlapping things going on here.

  • stripes-webpack supports the new JSX transform that means we
    shouldn't have to import React ... any longer, but BigTest tests
    fail without it when using karma v4 (from stripes-cli v1.2).
  • when using karma v6 (from stripes-cli v1.3), the karma config
    directives files and preprocessors cause test files not be found
    at all.

Bumping the stripes-cli dep (so we get karma v6) and cleaning up
karma.config.js (so it is v6 compatible, and more aligned with
configs in other repos) allows tests to run as they always did. Phew.

Refs STCOR-551

There are some overlapping things going on here.

* `stripes-webpack` supports the new JSX transform that means we
  shouldn't have to `import React ...` any longer, but BigTest tests
fail without it when using `karma` `v4` (from `stripes-cli` `v1.2`).
* when using `karma` `v6` (from `stripes-cli` `v1.3`), the karma config
  directives `files` and `preprocessors` cause test files not be found
at all.

Bumping the `stripes-cli` dep (so we get `karma` `v6`) and cleaning up
`karma.config.js` (so it is `v6` compatible, and more aligned with
configs in other repos) allows tests to run as they always did. Phew.

Refs STCOR-551
@github-actions
Copy link

github-actions bot commented Jun 9, 2021

Jest Unit Test Statistics

0 files  ±0  0 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a9a1453. ± Comparison against base commit a9a1453.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jun 9, 2021

BigTest Unit Test Statistics

    1 files  ±0      1 suites  ±0   11s ⏱️ ±0s
274 tests ±0  273 ✔️ ±0  1 💤 ±0  0 ❌ ±0 
277 runs  ±0  276 ✔️ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit a9a1453. ± Comparison against base commit a9a1453.

This pull request removes 5 and adds 3 tests. Note that renamed tests count towards both.
      equal to check email label in english translation
      equal to check email precautions label in english translation
      equal to sent email precautions label in english translation
Chrome_91_0_4472_77_(Linux_x86_64).Forgot username form test ‑ Forgot username form test check email status page tests should have the header with an appropriate text content
Chrome_91_0_4472_77_(Linux_x86_64).Forgot username form test ‑ Forgot username form test check email status page tests should have the paragraph with an appropriate text content
Chrome_91_0_4472_77_(Linux_x86_64).Forgot username form test ‑ Forgot username form test check email status page tests should have the header with an appropriate text content
      equal to check email label in english translation
Chrome_91_0_4472_77_(Linux_x86_64).Forgot username form test ‑ Forgot username form test check email status page tests should have the paragraph with an appropriate text content
      equal to check email precautions label in english translation
Chrome_91_0_4472_77_(Linux_x86_64).Forgot username form test ‑ Forgot username form test check email status page tests should have the paragraph with an appropriate text content
      equal to sent email precautions label in english translation

♻️ This comment has been updated with latest results.

@id-jenkins
Copy link

yarn run v1.22.5
$ eslint . && stylelint "src/**/*.css"

/home/jenkins/workspace/folio-org_stripes-core_PR-1081/project/src/Pluggable.js
16:16 warning 'name' is defined but never used. Allowed unused vars must match /React/u no-unused-vars

/home/jenkins/workspace/folio-org_stripes-core_PR-1081/project/src/components/MainNav/CurrentApp/AppContextDropdown.js
42:27 error 'open' is already declared in the upper scope no-shadow

/home/jenkins/workspace/folio-org_stripes-core_PR-1081/project/src/components/MainNav/MainNav.js
134:31 error Strings must use singlequote quotes

/home/jenkins/workspace/folio-org_stripes-core_PR-1081/project/src/components/MainNav/ProfileDropdown/ProfileDropdown.js
161:78 error Operator ':' must be spaced space-infix-ops

/home/jenkins/workspace/folio-org_stripes-core_PR-1081/project/src/discoverServices.js
57:18 warning 'entry' is defined but never used. Allowed unused vars must match /React/u no-unused-vars
64:18 warning 'entry' is defined but never used. Allowed unused vars must match /React/u no-unused-vars

/home/jenkins/workspace/folio-org_stripes-core_PR-1081/project/src/gatherActions.js
8:16 warning 'actionName' is defined but never used. Allowed unused vars must match /React/u no-unused-vars
19:14 warning 'key' is defined but never used. Allowed unused vars must match /React/u no-unused-vars
21:16 warning 'key2' is defined but never used. Allowed unused vars must match /React/u no-unused-vars

/home/jenkins/workspace/folio-org_stripes-core_PR-1081/project/test/bigtest/helpers/Harness.js
30:14 warning 'key' is defined but never used. Allowed unused vars must match /React/u no-unused-vars

/home/jenkins/workspace/folio-org_stripes-core_PR-1081/project/util/perm-tree.js
24:16 warning 'subperm' is defined but never used. Allowed unused vars must match /React/u no-unused-vars
42:14 warning 'perm' is defined but never used. Allowed unused vars must match /React/u no-unused-vars
47:14 warning 'key' is defined but never used. Allowed unused vars must match /React/u no-unused-vars
50:18 warning 'subperm' is defined but never used. Allowed unused vars must match /React/u no-unused-vars
58:12 warning 'key' is defined but never used. Allowed unused vars must match /React/u no-unused-vars
65:14 warning 'key' is defined but never used. Allowed unused vars must match /React/u no-unused-vars

✖ 16 problems (3 errors, 13 warnings)
2 errors and 0 warnings potentially fixable with the --fix option.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 9, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@doytch doytch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks for toiling in the mines. ⛏️

@zburke zburke merged commit a9a1453 into master Jun 9, 2021
@zburke zburke deleted the STCOR-551 branch June 9, 2021 14:50
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.

3 participants