Skip to content

Commit

Permalink
STCOR-551 configure karma for v6 compatibility (#1081)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zburke authored Jun 9, 2021
1 parent 7e189cf commit a9a1453
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
* Indicate that logging out of FOLIO will not affect an SSO session. Refs STCOR-532.
* Introduce `withNamespace` HOC. Refs STCOR-542.
* Pull user's locale settings from configurations on login, if available. Refs STCOR-527.
* Able to close `<AppContextDropdown>` outside. Refs STCOR-543.
* Able to close `<AppContextDropdown>` outside. Refs STCOR-543.
* Update `@folio/stripes-cli` to `^2.3.0` and update `karma.conf.js` for `karma` `v6` compatibility. Refs STCOR-551.

## [7.1.1](https://github.com/folio-org/stripes-core/tree/v7.1.1) (2021-04-22)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v7.1.0...v7.1.1)
Expand Down
10 changes: 0 additions & 10 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
module.exports = (config) => {
const testIndex = './test/bigtest/index.js';

const configuration = {
files: [
{ pattern: testIndex, watched: false },
],

preprocessors: {
[testIndex]: ['webpack']
},

browserStack: {
project: 'stripes-core'
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@bigtest/mocha": "^0.5.1",
"@bigtest/react": "^0.1.2",
"@folio/eslint-config-stripes": "^5.2.0",
"@folio/stripes-cli": "^2.0.0",
"@folio/stripes-cli": "^2.3.0",
"@folio/stripes-components": "^9.2.0",
"@folio/stripes-connect": "^6.2.0",
"@folio/stripes-logger": "^1.0.0",
Expand Down

0 comments on commit a9a1453

Please sign in to comment.