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

Import initial group of tests. #1442

Merged
merged 6 commits into from
Oct 9, 2023
Merged

Conversation

lucasnetau
Copy link
Collaborator

Code coverage at 54%. A lot of mouse driven code does not yet have tests provided

…tion of primitives (String -> string) has been applied to match what is returned by typeof
@lucasnetau
Copy link
Collaborator Author

> formBuilder@3.13.0 test
> jest --coverage

PASS tests/utils.test.js
PASS tests/form-builder.test.js
PASS tests/form-render.test.js
PASS tests/sanitizer.test.js
PASS tests/control/text.test.js
PASS tests/control/textarea.test.js
PASS tests/control/paragraph.test.js
PASS tests/control/button.test.js
PASS tests/control/hidden.test.js
PASS tests/control/control_plugin.test.js
PASS tests/dom.test.js
PASS tests/control/custom.test.js
PASS tests/events.test.js
PASS tests/hello.test.js
------------------------|---------|----------|---------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
File                    | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
------------------------|---------|----------|---------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
All files               |   52.35 |    44.02 |   52.77 |   52.64 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
 src/js                 |   54.3[8](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:9) |    45.78 |   54.08 |   54.68 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  config.js             |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  control.js            |   87.38 |    82.55 |    [9](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:10)0.9 |   87.38 | 45,61-62,67,112-113,129,135,174,294-295,326,329,343                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
  controls.js           |    73.8 |     65.9 |      70 |    75.3 | 65,78,[10](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:11)7-[11](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:12)8,137,147-149,158-161,168                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  data.js               |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  dom.js                |   94.28 |    66.66 |   83.33 |   96.96 | [12](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:13)9                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
  events.js             |   66.66 |       50 |     100 |   66.66 | 16-17                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  form-builder.js       |   41.77 |    34.12 |   35.78 |    42.4 | 73,111-1[13](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:14),121,133-192,198-199,205-221,254,260,278,283-284,288-289,306,315-327,344,349-350,374-376,383,393,431,486,555,617-618,622-623,632,642-643,677,695,697,724-729,764-766,790,804,810,830,858,872,1027,1071,1097,1153,1166-1222,1226,1231-1232,1235,1241-1245,1258-[14](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:15)83,1493-[15](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:16)26,1546,1552-1553,1579-[16](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:17)15,1621-1629,1640-1652,1659-1669,1675-1682,1687-1695,[17](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:18)00-1702,1706-1709,1716-1743,1748-1751,1759-1771,1782-1785,1790-1794,1799,[18](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:19)03-1847,1853-1898,[19](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:20)03-1930,1940-1950,1955-[20](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:21)07,2014-2098,[21](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:22)05-2109,2114-2121,2125-2148,2158-2317,2330-2345,2350-2357,2362,2367-2371,2378-2392,2400-2401,2403,2411,2415-2419,2428-2462,2470-2478,2525-2526,2538-2542 
  form-render.js        |   76.43 |    53.06 |   72.09 |   78.39 | 54-60,89,112-120,138,153-154,174,176,233-234,245-246,248,263,290,298,327,331,366-380                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
  helpers.js            |   39.28 |    29.83 |    40.9 |   39.66 | 53-104,176-177,208,233-237,240-243,249,261-265,313,316,337,379-380,397,441-444,449-455,488,512-532,561-706,725,729,754-1076,1092,1099,1127-1128,1218,1244-1245,1256,1293-1408,1418,1423,1439,1449-1520                                                                                                                                                                                                                                                                                                                                                                                                                                                              
  layout.js             |   84.37 |    70.37 |   92.85 |   84.12 | 14,27-28,60,153,158,178-183,208                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  sanitizer.js          |   80.76 |    69.73 |      85 |   81.37 | [22](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:23),28,39-42,52-56,116-117,140-143,151,167-171,202,210                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  utils.js              |   81.48 |    70.13 |   78.31 |   81.09 | 35,97,193,[23](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:24)5-237,[24](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:25)8,288,407-413,512,543-555,574-576,593,630-647,651-652,672-698,751-752,756,759,770-781                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
 src/js/control         |    38.2 |     32.7 |   39.72 |    38.7 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  autocomplete.js       |    13.6 |     1.92 |   17.39 |   13.93 | 28-91,95-130,148-152,169-255,265-300                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
  button.js             |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  custom.js             |   74.46 |    45.45 |     100 |   74.46 | 43-44,55-69,89,118,147,150                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
  file.fineuploader.js  |    8.82 |        0 |   11.11 |    9.09 | 53-249                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
  hidden.js             |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  index.js              |       0 |        0 |       0 |       0 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  paragraph.js          |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  select.js             |   38.05 |    46.03 |   23.07 |   38.53 | 37-41,50,62,74,84,95-97,107-137,154-182,191-229                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  text.js               |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  textarea.js           |   93.75 |    88.88 |   83.33 |   93.75 | 57                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
  textarea.quill.js     |   47.61 |    42.85 |      50 |   47.61 | 60-72                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  textarea.tinymce.js   |   29.26 |       20 |   33.33 |   29.26 | 32-37,42,68,77-112                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
 src/js/control_plugins |   81.81 |       25 |      80 |      80 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  starRating.js         |   81.81 |       25 |      80 |      80 | 45-46                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
 tests                  |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  setup-fb.js           |     100 |      100 |     100 |     100 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
------------------------|---------|----------|---------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Test Suites: 14 passed, 14 total
Tests:       8 todo, 1[29](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:30) passed, 137 total
Snapshots:   0 total
Time:        10.[35](https://github.com/kevinchappell/formBuilder/actions/runs/6437410760/job/17482473591?pr=1442#step:7:36)7 s
Ran all test suites.

@lucasnetau lucasnetau merged commit 20fe08a into kevinchappell:master Oct 9, 2023
1 check passed
@lucasnetau lucasnetau deleted the tests branch October 9, 2023 23:01
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

🎉 This PR is included in version 3.13.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant