surveyjs_react_quickstart icon indicating copy to clipboard operation
surveyjs_react_quickstart copied to clipboard

npm test fails

Open TristanBa opened this issue 6 years ago • 1 comments

I downloaded the latest release and ran the tests, but it fails. Please advise on the fix

>npm test

> [email protected] test C:\Code\Svy
> react-scripts test --env=jsdom

 FAIL  src\App.test.js
  ● Test suite failed to run

    ReferenceError: jQuery is not defined

      at node_modules/jquery-ui/ui/widgets/datepicker.js:33:12
      at Object.<anonymous> (node_modules/jquery-ui/ui/widgets/datepicker.js:35:2)
      at Object.<anonymous> (src/SurveyCreator.js:15:1)
      at Object.<anonymous> (src/App.js:4:22)
      at Object.<anonymous> (src/App.test.js:3:12)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        1.725s
Ran all test suites related to changed files.

Watch Usage
 › Press p to filter by a filename regex pattern.
 › Press t to filter by a test name regex pattern.
 › Press q to quit watch mode.
 › Press Enter to trigger a test run.

TristanBa avatar Jul 27 '19 21:07 TristanBa

Sorry for the late response. This project is a boilerplate demonstrating how to integrate SurveyJS libraries into default react project template. We didn't add any unit tests here and the default ones doesn't related to SurveyJS code. As far as I understand from the error message you need to load (add) a iquery script

tsv2013 avatar Sep 17 '19 06:09 tsv2013