Commit 0d2f269
authored
Make error message more descriptive and run informal tests
In the Draggable class, replace the error message in the definition of setEventDetector() and setEventResponder() with a template literal that includes the erroneous user input, so that it's easier for the user to see which part of their code is causing the problem.
Also run a few informal tests of the setters for both detectors and responders by adapting and executing the draggable line demo in pull request #9, including tests with and without erroneous input for the type parameter. Test coverage is not complete but is sufficient for the prototype.1 parent d3af563 commit 0d2f269
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
661 | | - | |
| 661 | + | |
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
688 | | - | |
| 688 | + | |
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
| |||
0 commit comments