Skip to content

test: add testing-library/dom and jquery dependencies#2441

Open
afc163 wants to merge 1 commit intoakiran:masterfrom
afc163:build/add-testing-library-dom-dependency
Open

test: add testing-library/dom and jquery dependencies#2441
afc163 wants to merge 1 commit intoakiran:masterfrom
afc163:build/add-testing-library-dom-dependency

Conversation

@afc163
Copy link
Contributor

@afc163 afc163 commented Dec 4, 2025

 FAIL  examples/__tests__/CentreMode.test.js
  ● Test suite failed to run

    Cannot find module '@testing-library/dom' from 'node_modules/_@testing-library_react@16.3.0@@testing-library/react/dist/pure.js'

    Require stack:
      node_modules/_@testing-library_react@16.3.0@@testing-library/react/dist/pure.js
      node_modules/_@testing-library_react@16.3.0@@testing-library/react/dist/index.js
      examples/__tests__/CentreMode.test.js

      1 | import React from "react";
      2 | import CenterMode from "../CenterMode";
    > 3 | import { render } from "@testing-library/react";
        | ^
      4 | import { html as beautify_html } from "js-beautify";
      5 | import {
      6 |   getActiveSlides,
 FAIL  __tests__/SimpleSlider.test.js
  ● Test suite failed to run

    Cannot find module 'jquery' from '__tests__/testUtils.js'

    Require stack:
      __tests__/testUtils.js
      __tests__/SimpleSlider.test.js

      1 | import React from "react";
    > 2 | import $ from "jquery";
        | ^
      3 | import assign from "object-assign";
      4 | import { render } from "@testing-library/react";
      5 | import Slider from "../src/slider";

      at Resolver._throwModNotFoundError (node_modules/_jest-resolve@28.1.3@jest-resolve/build/resolver.js:491:11)
      at Object.require (__tests__/testUtils.js:2:1)
      at Object.require (__tests__/SimpleSlider.test.js:3:1)

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.

1 participant