surveyjs / surveyjs_react_quickstart

SurveyJS + React Quickstart Template
http://surveyjs.io
140 stars 80 forks source link

npm test fails #13

Open TristanBa opened 5 years ago

TristanBa commented 5 years ago

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

>npm test

> surveyjs_react_quickstart_new@0.1.0 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.
tsv2013 commented 5 years ago

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