{"action":"created","issue":{"url":"https://api.github.com/repos/substack/tape/issues/301","repository_url":"https://api.github.com/repos/substack/tape","labels_url":"https://api.github.com/repos/substack/tape/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/substack/tape/issues/301/comments","events_url":"https://api.github.com/repos/substack/tape/issues/301/events","html_url":"https://github.com/substack/tape/issues/301","id":166007684,"number":301,"title":"Command line option -n to run a test by number","user":{"login":"jtlapp","id":138133,"avatar_url":"https://avatars.githubusercontent.com/u/138133?v=3","gravatar_id":"","url":"https://api.github.com/users/jtlapp","html_url":"https://github.com/jtlapp","followers_url":"https://api.github.com/users/jtlapp/followers","following_url":"https://api.github.com/users/jtlapp/following{/other_user}","gists_url":"https://api.github.com/users/jtlapp/gists{/gist_id}","starred_url":"https://api.github.com/users/jtlapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtlapp/subscriptions","organizations_url":"https://api.github.com/users/jtlapp/orgs","repos_url":"https://api.github.com/users/jtlapp/repos","events_url":"https://api.github.com/users/jtlapp/events{/privacy}","received_events_url":"https://api.github.com/users/jtlapp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-07-18T01:47:54Z","updated_at":"2016-07-23T21:30:48Z","closed_at":null,"body":"I've written this and having it working but can't seem to get a test suite running. UPDATE: It's now working at the link below. Just waiting for decision on PR.\r\n\r\nI absolutely love the simplicity of `tape`, but it asks me to do something that I find anathema: modify code to run a particular test and remember to remove my modifications when I'm done. If I forgot to remove the `.only` constraint, I may check it in. That's easy to fix. The worst scenario is unwittingly changing something in the test while it's in the editor. This happens.\r\n\r\nSo while I respect that some people are really comfortable with the `.only` feature, I suspect I'm not the only one who is really uncomfortable with it. Fortunately, there's an easy fix.\r\n\r\nAll we need is a `-n` command line option. If you leave the option off, everything runs as it has. If you include a simple `-n`, all the tests run as usual, except that a test number is prefixed to the title of each test.\r\n\r\nTo run a particular test, just place `-nN` on the command line, where `N` is the test number shown in the title.\r\n\r\nThis approach allows `tape` to satisfy die-hards like me who prefer not to make edits that shouldn't be checked in.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/substack/tape/issues/comments/234741551","html_url":"https://github.com/substack/tape/issues/301#issuecomment-234741551","issue_url":"https://api.github.com/repos/substack/tape/issues/301","id":234741551,"user":{"login":"jtlapp","id":138133,"avatar_url":"https://avatars.githubusercontent.com/u/138133?v=3","gravatar_id":"","url":"https://api.github.com/users/jtlapp","html_url":"https://github.com/jtlapp","followers_url":"https://api.github.com/users/jtlapp/followers","following_url":"https://api.github.com/users/jtlapp/following{/other_user}","gists_url":"https://api.github.com/users/jtlapp/gists{/gist_id}","starred_url":"https://api.github.com/users/jtlapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtlapp/subscriptions","organizations_url":"https://api.github.com/users/jtlapp/orgs","repos_url":"https://api.github.com/users/jtlapp/repos","events_url":"https://api.github.com/users/jtlapp/events{/privacy}","received_events_url":"https://api.github.com/users/jtlapp/received_events","type":"User","site_admin":false},"created_at":"2016-07-23T21:30:48Z","updated_at":"2016-07-23T21:30:48Z","body":"Thanks @ljharb. I don't think we could support `-n` on node-run tests without having the test javascript itself explicitly assert that `-n` on the test should pass on to tape. Otherwise we can't know that `-n` doesn't conflict with some argument that the module being run might use."}}
{"actor":{"display_login":"jtlapp"}}