Comments (12)
Yep - looks like this error has resurfaced
from atom-ruby-test.
This seems to happen when trying to run "Ruby Test: Test All" when no files are open.
from atom-ruby-test.
This also happens when the opened file is not a "runnable" test file, but it feels like "Ruby Test: Test All" should work when the editor is in any state.
I guess there would need to be a setting or a clever way of working out what to do when a usable file isn't open but a shortcut is used.
Can this issue be re-opened and I'll try and take a look at it?
from atom-ruby-test.
When this error happens, second pane appears and I can't close it. Is there is any way to close this pane?
[Enter steps to reproduce below:]
- Tried run
cmd-ctrl-y
on ordinal ruby file
Atom Version: 0.182.0
System: Mac OS X 10.10.2
Thrown From: ruby-test package, v0.9.5
Stack Trace
Uncaught TypeError: Cannot read property 'replace' of undefined
At /Users/rubydev/.atom/packages/ruby-test/lib/test-runner.coffee:32
TypeError: Cannot read property 'replace' of undefined
at TestRunner.module.exports.TestRunner.command (/Users/rubydev/.atom/packages/ruby-test/lib/test-runner.coffee:32:10)
at TestRunner.command (/Users/rubydev/.atom/packages/ruby-test/lib/test-runner.coffee:1:1)
at TestRunner.module.exports.TestRunner.run (/Users/rubydev/.atom/packages/ruby-test/lib/test-runner.coffee:15:28)
at RubyTestView.module.exports.RubyTestView.runTest (/Users/rubydev/.atom/packages/ruby-test/lib/ruby-test-view.coffee:66:13)
at RubyTestView.module.exports.RubyTestView.testAll (/Users/rubydev/.atom/packages/ruby-test/lib/ruby-test-view.coffee:53:6)
at atom-workspace.<anonymous> (/Users/rubydev/.atom/packages/ruby-test/lib/ruby-test-view.coffee:25:67)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:176:20)
Commands
-3:05.2 window:update-available (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-light-syntax.theme-one-light-ui)
-1:51.1 project-manager:toggle (atom-text-editor.editor)
-1:49.4 core:confirm (atom-text-editor.editor.mini)
-1:33.8 ruby-quick-test:run-tests (atom-text-editor.editor)
-1:27.7 find-and-replace:select-next (atom-text-editor.editor)
2x -1:23.3 core:save (atom-text-editor.editor)
-0:19.1 linter:next-message (atom-text-editor.editor.is-focused)
-0:04.5 ruby-test:test-all (atom-text-editor.editor.is-focused)
Config
{
"core": {
"themes": [
"one-light-ui",
"one-light-syntax"
],
"disabledPackages": [
"vim-mode"
]
}
}
Installed Packages
# User
atom-beautify, v0.21.3
atom-color-highlight, v3.0.8
autocomplete-plus, v2.2.0
autocomplete-plus-async, v0.22.0
ember-snippets, v1.0.0
emmet, v2.3.4
git-projects, v1.8.1
highlight-line, v0.10.1
line-ending-converter, v1.0.0
linter, v0.12.0
linter-rubocop, v0.2.2
linter-ruby, v0.1.4
project-manager, v1.15.5
revert-buffer, v0.5.0
ruby-block, v0.2.2
ruby-block-converter, v3.2.0
ruby-define-method, v0.2.0
ruby-quick-test, v0.3.0
ruby-slim, v0.2.0
ruby-test, v0.9.5
script, v2.18.0
# Dev
No dev packages
from atom-ruby-test.
I also see this issue running a test file for minitest.
The stacktrace:
TypeError: Cannot read property 'replace' of undefined
at TestRunner.module.exports.TestRunner.command (/Users/tjs/Dropbox (Personal)/Atom/packages/ruby-test/lib/test-runner.coffee:32:10)
at TestRunner.command (/Users/tjs/Dropbox (Personal)/Atom/packages/ruby-test/lib/test-runner.coffee:1:1)
at TestRunner.module.exports.TestRunner.run (/Users/tjs/Dropbox (Personal)/Atom/packages/ruby-test/lib/test-runner.coffee:15:28)
at RubyTestView.module.exports.RubyTestView.runTest (/Users/tjs/Dropbox (Personal)/Atom/packages/ruby-test/lib/ruby-test-view.coffee:72:13)
at RubyTestView.module.exports.RubyTestView.testFile (/Users/tjs/Dropbox (Personal)/Atom/packages/ruby-test/lib/ruby-test-view.coffee:53:6)
at atom-workspace.<anonymous> (/Users/tjs/Dropbox (Personal)/Atom/packages/ruby-test/lib/ruby-test-view.coffee:24:68)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:184:20)
One point of interest is that the test and code under test are in the same file. The test runs fine from the command line with ruby <filename>
. I tried both with and without changing "Minitest command: run test file" to be the same as what I used on the command line.
Let me know if there's any other information you need to debug.
from atom-ruby-test.
@tjstankus: I'm not able to reproduce it:
Here's the test file from the video:
https://github.com/moxley/atom-ruby-test-samples/blob/master/minitest_sample/test/square_test.rb
from atom-ruby-test.
I get the same error with no matter what .rb file I'm trying to run, including the minitest linked in the previous post or a simple 1+1. (They run fine from the Terminal.) Running OSX & Atom latest.
Uncaught TypeError: Cannot read property 'replace' of undefined /Users/zita/.atom/packages/ruby-test/lib/test-runner.coffee:32 TypeError: Cannot read property 'replace' of undefined at TestRunner.module.exports.TestRunner.command (/Users/zita/.atom/packages/ruby-test/lib/test-runner.coffee:32:10) at TestRunner.command (/Users/zita/.atom/packages/ruby-test/lib/test-runner.coffee:1:1) at TestRunner.module.exports.TestRunner.run (/Users/zita/.atom/packages/ruby-test/lib/test-runner.coffee:15:28) at RubyTestView.module.exports.RubyTestView.runTest (/Users/zita/.atom/packages/ruby-test/lib/ruby-test-view.coffee:72:13) at RubyTestView.module.exports.RubyTestView.testSingle (/Users/zita/.atom/packages/ruby-test/lib/ruby-test-view.coffee:56:6) at atom-workspace. (/Users/zita/.atom/packages/ruby-test/lib/ruby-test-view.coffee:25:70) at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29) at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61) at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19) at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1013:28) at emitOne (events.js:77:13) at EventEmitter.emit (events.js:169:7)
from atom-ruby-test.
Hello,
I get same problem, this is stacktrace:
TypeError: Cannot read property 'replace' of undefined
at TestRunner.module.exports.TestRunner.command (file:///C:/Users/tegagni/.atom/packages/ruby-test/lib/test-runner.coffee:32:10)
at TestRunner.command (file:///C:/Users/tegagni/.atom/packages/ruby-test/lib/test-runner.coffee:1:1)
at TestRunner.module.exports.TestRunner.run (file:///C:/Users/tegagni/.atom/packages/ruby-test/lib/test-runner.coffee:15:28)
at RubyTestView.module.exports.RubyTestView.runTest (file:///C:/Users/tegagni/.atom/packages/ruby-test/lib/ruby-test-view.coffee:72:13)
at RubyTestView.module.exports.RubyTestView.testFile (file:///C:/Users/tegagni/.atom/packages/ruby-test/lib/ruby-test-view.coffee:53:6)
at atom-workspace. (file:///C:/Users/tegagni/.atom/packages/ruby-test/lib/ruby-test-view.coffee:24:68)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\tegagni\AppData\Local\atom\app-1.9.0\resources\app.asar\src\command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (C:\Users\tegagni\AppData\Local\atom\app-1.9.0\resources\app.asar\src\command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (C:\Users\tegagni\AppData\Local\atom\app-1.9.0\resources\app.asar\src\command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\tegagni\AppData\Local\atom\app-1.9.0\resources\app.asar\src\atom-environment.js:1104:28)
at EventEmitter.outerCallback (C:\Users\tegagni\AppData\Local\atom\app-1.9.0\resources\app.asar\src\application-delegate.js:327:25)
at emitTwo (events.js:100:13)
at EventEmitter.emit (events.js:185:7)
Running with win7 64bit
from atom-ruby-test.
Same issue here with Minitest, and "Test File":
/home/ari/.atom/packages/ruby-test/lib/test-runner.coffee:57
Hide Stack Trace
TypeError: Cannot read property 'replace' of undefined
at TestRunner.module.exports.TestRunner.command (/home/ari/.atom/packages/ruby-test/lib/test-runner.coffee:57:10)
at TestRunner.command (/home/ari/.atom/packages/ruby-test/lib/test-runner.coffee:1:1)
at TestRunner.module.exports.TestRunner.run (/home/ari/.atom/packages/ruby-test/lib/test-runner.coffee:27:23)
at RubyTestView.module.exports.RubyTestView.runTest (/home/ari/.atom/packages/ruby-test/lib/ruby-test-view.coffee:57:13)
at RubyTestView.module.exports.RubyTestView.testFile (/home/ari/.atom/packages/ruby-test/lib/ruby-test-view.coffee:41:6)
at atom-workspace.<anonymous> (/home/ari/.atom/packages/ruby-test/lib/ruby-test-view.coffee:16:68)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app/src/command-registry.js:265:35)
at /opt/atom/resources/app/src/command-registry.js:3:65
at Object.didConfirmSelection (/opt/atom/resources/app/node_modules/command-palette/lib/command-palette-view.js:106:35)
at SelectListView.confirmSelection (/opt/atom/resources/app/node_modules/atom-select-list/src/select-list-view.js:313:26)
at HTMLDivElement.core:confirm (/opt/atom/resources/app/node_modules/atom-select-list/src/select-list-view.js:81:20)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app/src/command-registry.js:265:35)
at /opt/atom/resources/app/src/command-registry.js:3:65
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:610:22)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:401:28)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/opt/atom/resources/app/src/window-event-handler.js:100:42)
at HTMLDocument.<anonymous> (/opt/atom/resources/app/src/window-event-handler.js:3:65)
The error was thrown from the ruby-test package. This issue has already been
from atom-ruby-test.
@gee-forr is the file you are attempting to run named *_test.rb or *_spec.rb? I realize it needs better error handling and could figure out if its a test file other ways, but the way it currently is, the filename needs to end in _test.rb or _spec.rb
from atom-ruby-test.
@nolanpro - So, I don't have this issue anymore... I can't say if the issue has been resolved or if it's still around, as I am experiencing another issue #109 instead.
But, to answer your question, all my tests are suffixed with _spec.rb
.
from atom-ruby-test.
[Enter steps to reproduce:]
- ...
- ...
Atom: 1.38.2 x64
Electron: 2.0.18
OS: Mac OS X 10.14.5
Thrown From: ruby-test package 1.0.2
Stack Trace
Uncaught TypeError: Cannot read property 'replace' of undefined
At /Users/nawaf/.atom/packages/ruby-test/lib/test-runner.coffee:57
TypeError: Cannot read property 'replace' of undefined
at TestRunner.module.exports.TestRunner.command (/packages/ruby-test/lib/test-runner.coffee:57:11)
at TestRunner.command (/packages/ruby-test/lib/test-runner.coffee:1:1)
at TestRunner.module.exports.TestRunner.run (/packages/ruby-test/lib/test-runner.coffee:27:23)
at RubyTestView.module.exports.RubyTestView.runTest (/packages/ruby-test/lib/ruby-test-view.coffee:57:13)
at RubyTestView.module.exports.RubyTestView.testFile (/packages/ruby-test/lib/ruby-test-view.coffee:41:6)
at /packages/ruby-test/lib/ruby-test-view.coffee:16:68)
at CommandRegistry.handleCommandEvent (/private/var/folders/_y/gv_cfxy13175jx2gjb1bh56c0000gn/T/AppTranslocation/7842AA57-854F-4833-98C3-CF13B8F517DF/d/Atom.app/Contents/Resources/app/static/<embedded>:11:348418)
at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/private/var/folders/_y/gv_cfxy13175jx2gjb1bh56c0000gn/T/AppTranslocation/7842AA57-854F-4833-98C3-CF13B8F517DF/d/Atom.app/Contents/Resources/app/static/<embedded>:11:1247210)
at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/private/var/folders/_y/gv_cfxy13175jx2gjb1bh56c0000gn/T/AppTranslocation/7842AA57-854F-4833-98C3-CF13B8F517DF/d/Atom.app/Contents/Resources/app/static/<embedded>:11:1243344)
at WindowEventHandler.handleDocumentKeyEvent (/private/var/folders/_y/gv_cfxy13175jx2gjb1bh56c0000gn/T/AppTranslocation/7842AA57-854F-4833-98C3-CF13B8F517DF/d/Atom.app/Contents/Resources/app/static/<embedded>:11:283624)
Commands
2x -5:44.7.0 core:backspace (input.hidden-input)
-4:48.1.0 editor:newline (input.hidden-input)
-4:44.9.0 autocomplete-plus:confirm (input.hidden-input)
-4:44.8.0 snippets:expand (atom-text-editor.editor.is-focused.autocomplete-active)
7x -4:37.4.0 core:backspace (input.hidden-input)
-2:02.8.0 core:undo (div.line-number.cursor-line)
-1:55.7.0 core:redo (div.line-number)
-1:42.9.0 atom-psql:run_selection (div.line-number)
-1:34.1.0 ruby-test:test-file (input.hidden-input)
Non-Core Packages
atom-alignment 0.13.0
atom-beautify 0.33.4
atom-material-syntax 1.0.8
atom-material-ui 2.1.3
atom-psql 0.33.0
autoclose-html 0.23.0
autocomplete-python 1.14.1
autocomplete-ruby 0.2.8
busy-signal 2.0.1
color-indent 1.0.2
color-picker 2.3.0
emmet 2.4.3
file-icons 2.1.33
git-plus 8.7.1
highlight-selected 0.16.0
intentions 1.1.5
kite 0.165.0
language-pgsql 0.2.3
linter 2.3.0
linter-flake8 2.4.0
linter-ruby 1.3.1
linter-ui-default 1.7.1
open-recent 5.0.0
pigments 0.40.2
platformio-ide-terminal 2.9.1
python-autopep8 0.1.3
ruby-test 1.0.2
tool-bar 1.1.11
vk-terminal 3.0.1
from atom-ruby-test.
Related Issues (20)
- Overwrites spec files white space if using Whitespace package HOT 1
- Atom 1.17 Docks support HOT 2
- Looking for maintainer HOT 4
- Toggle to the test panel to activate the package: cmd-ctrl-x does not work HOT 2
- Changes required due to TextBuffer.save becoming async in Atom 1.19 HOT 2
- Spring problem, terminal is reopening on each run
- Testing just opens a shell, but doesnt run the tests. HOT 1
- Not have option to zoom/alter the font, is very small. HOT 1
- Uncaught TypeError: Cannot read property 'nodeName' of undefined
- how to test gem
- platformio-ide-terminal no longer supported - how do I reconfigure to use terminus? HOT 3
- not working for win 7 HOT 1
- Closing the test pane leaves a blank bar HOT 2
- Using Atom 1.8.0, the Settings-->Packages widget cant find "Ruby Test" HOT 1
- Spec framework incorrectly identified as minitest when using require_relative spec_helper HOT 1
- Run tests for current code file HOT 2
- Suggestion: Command Prefix HOT 2
- Cancelling doesn't actually cancel. HOT 1
- Update Documentation for running single file test HOT 1
- Focus issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-ruby-test.