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

Cannot use import statement outside a module #7192

Closed
6 tasks done
Nely-Hartenyan opened this issue Nov 16, 2023 · 1 comment
Closed
6 tasks done

Cannot use import statement outside a module #7192

Nely-Hartenyan opened this issue Nov 16, 2023 · 1 comment
Labels

Comments

@Nely-Hartenyan
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/dnfw9v?file=/src/App.jsx

Bug description

I use "swiper": "^11.0.4".
When i run test i get this error
Screen Shot 2023-11-16 at 22 49 00

my jest.config
`import type { Config } from 'jest';

const config: Config = {
clearMocks: true,
coverageDirectory: './',
coverageReporters: ['cobertura', 'text'],
testEnvironment: 'jsdom',
moduleDirectories: ['node_modules'],
testMatch: [
// "/tests//.[jt]s?(x)",
// "**/?(
.)+(spec|test).[tj]s?(x)"
'src/**/(.)@(spec|test).[tj]s?(x)',
],
moduleFileExtensions: ['js', 'mjs', 'cjs', 'jsx', 'ts', 'tsx', 'json', 'node'],

modulePaths: ['src'],
setupFilesAfterEnv: ['setupTests.ts'],
};

export default config;
`

Expected Behavior

No response

Actual Behavior

No response

Swiper version

11.0.4

Platform/Target and Browser Versions

macOs, Chrome

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
Repository owner locked and limited conversation to collaborators Nov 16, 2023
@nolimits4web
Copy link
Owner

Do you want to ask a question? Are you looking for support? Stack Overflow or Swiper Discussions is the best places for getting support

Please, don't use GitHub issues for questions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants