Hi Pete, Thanks for the contribution. You've caught us in transition, and the development setup isn't as nice as it should be. We're working toward the 5.0 release, transitioning everything to ES modules, and reworking the development tools. During this period, the docs are out of date and there are some things that aren't working as they should.
But, to answer your questions: 1. To run a single test, append `only` to a `describe` or `it` block. This requires editing one of the test files. See https://github.com/openlayers/openlayers/commit/611eeb19f044d0f0a19d9d1e58a40326cb2f597a and the details below. 2. You can insert a `debugger` statement anywhere in the test or the library code. See https://github.com/openlayers/openlayers/commit/21cbc9ec00074b34be315b066fc83ab7e3556caf and the details below. 3. In the future, the Makefile will be gone. See above about the transition to 5.0. All development tasks will be npm scripts. To debug the tests, run `npm run karma`, load http://localhost:9876/debug.html, and open the developer tools. This is a pretty rough experience currently - things should improve as we approach the 5.0 release. Tim On Fri, Jan 12, 2018 at 2:55 PM Peter Schmitt via OpenLayers Dev < openlayers-dev+apn2wqdftrt82kptxpzygtygzy6w8iu-gob9zv1pplfzro...@googlegroups.com> wrote: > Just submitted my first OpenLayers pull request and came up with a couple > of questions: > > 1. I'm a node/npm/karma newbie. How do I run a single test? I'm used > to Ruby/rspec where I can do something like: > env SPEC=./spec/models/user_spec.rb rake spec > to run all tests in a given file, or to run the test at line 45 of the > file: > env SPEC="./spec/models/user_spec.rb#45" rake spec > 2. From the shell, is there a way to pull up a debugger or > `console.log(...)` from a test? In ruby, I might add `require 'byebug'; > byebug` or in Python I might `import ipdb; ipdb.set_trace()` to pull up a > REPL at a particular line in my test. > 3. DEVELOPING.md talks of a Make-based build system, but most of the > targets are missing from the Makefile. Looks like some commands can be run > with npm instead (`npm test` instead of `make test`). I would > update/submit a pull request, but I'm not sure how to find the commands > that work. > > Cheers, > Pete > > -- > You received this message because you are subscribed to the Google Groups > "OpenLayers Dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to openlayers-dev+unsubscr...@googlegroups.com. > To post to this group, send email to openlayers-dev@googlegroups.com. > Visit this group at https://groups.google.com/group/openlayers-dev. > To view this discussion on the web visit > https://groups.google.com/d/msgid/openlayers-dev/abd7d018-13f0-4068-8a9a-985f8bf2dc44%40googlegroups.com > <https://groups.google.com/d/msgid/openlayers-dev/abd7d018-13f0-4068-8a9a-985f8bf2dc44%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "OpenLayers Dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to openlayers-dev+unsubscr...@googlegroups.com. To post to this group, send email to openlayers-dev@googlegroups.com. Visit this group at https://groups.google.com/group/openlayers-dev. To view this discussion on the web visit https://groups.google.com/d/msgid/openlayers-dev/CAKdrn%2Betih7sWN--tTNostJBBd0Do%2Bvu%3DCMbvHfmLQSQHoWQ9w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.