You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have included Ally.js into a React/Redux/TypeScript project. Now, that I have made some good progress including it and getting it working I have hit an error when running yarn test before committing the updates. The error is as follows:
FAIL src/containers/App/tests/index.test.tsx
● Test suite failed to run
[path]/node_modules/ally.js/esm/maintain/disabled.js:21
import nodeArray from '../util/node-array';
^^^^^^
SyntaxError: Unexpected token import
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/ScriptTransformer.js:289:17)
at Object.<anonymous> (src/components/RightSidebar/index.tsx:19:18)
at Object.<anonymous> (src/components/Layout/index.tsx:6:22)
I have imported the components in from the ESM directory and added them to my types file for ActionScript.
And inside my RightSidebar component I bring the components in with the following:
import AllyDisabled from 'ally.js/esm/maintain/disabled';
import AllyTabFocus from 'ally.js/esm/maintain/tab-focus';
import AllyKey from 'ally.js/esm/when/key';
Running this works fine as I've gotten the functionality to work. Only now when I run yarn test do I hit the error.
The text was updated successfully, but these errors were encountered:
I am using CreateReactApp which by default supports Jest. Since CRA does support ES6 syntax, I am unsure if that is the issue here. I would also suspect it would occur in more files than just nodeArray.
I've tried a couple different workarounds but with no luck yet.
I have included Ally.js into a React/Redux/TypeScript project. Now, that I have made some good progress including it and getting it working I have hit an error when running
yarn test
before committing the updates. The error is as follows:I have imported the components in from the ESM directory and added them to my types file for ActionScript.
And inside my RightSidebar component I bring the components in with the following:
Running this works fine as I've gotten the functionality to work. Only now when I run
yarn test
do I hit the error.The text was updated successfully, but these errors were encountered: