dreamscapes / atom-ide-mocha Goto Github PK
View Code? Open in Web Editor NEWIntegrate Mocha progress into Atom-IDE-UI โ๏ธ + โ๏ธ = ๐
Home Page: https://atom.io/packages/ide-mocha
License: BSD 3-Clause "New" or "Revised" License
Integrate Mocha progress into Atom-IDE-UI โ๏ธ + โ๏ธ = ๐
Home Page: https://atom.io/packages/ide-mocha
License: BSD 3-Clause "New" or "Revised" License
Is your feature request related to a problem? Please describe.
Sometimes the test suite produces logs relevant to test failures via custom logs, either to stdout
or stderr
streams. These streams are not captured by Mocha and are instead shown in the parent terminal window. This makes debugging harder to follow since the user must remember to look into that window to see the additional logs. This package somewhat sets the expectations that everything that's produced during test suite execution will be shown in Atom's Console UI.
Describe the solution you'd like
We might be able to capture the output streams when Mocha runs and send them over to Atom as custom events.
Atom: 1.34.0-beta0 x64
Electron: 2.0.14
OS: Mac OS X 10.14.1
Thrown From: ide-mocha package 1.4.1
Uncaught SyntaxError: Unexpected end of JSON input
At events.js:183
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at JSONParser._transform (/packages/ide-mocha/node_modules/remote-event-emitter/src/consumer/deserialisers/json-parser.js:21:19)
at JSONParser.Transform._read (_stream_transform.js:186:10)
at JSONParser.Transform._write (_stream_transform.js:174:12)
at doWrite (_stream_writable.js:387:12)
at writeOrBuffer (_stream_writable.js:373:5)
at JSONParser.Writable.write (_stream_writable.js:290:11)
at Deserialiser.ondata (_stream_readable.js:639:20)
at emitOne (events.js:116:13)
at Deserialiser.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Deserialiser.Readable.push (_stream_readable.js:208:10)
at Deserialiser.Transform.push (_stream_transform.js:147:32)
at done (_stream_transform.js:208:12)
at _flush (_stream_transform.js:138:7)
at Deserialiser._flush (/packages/ide-mocha/node_modules/remote-event-emitter/src/consumer/deserialisers/deserialiser.js:44:19)
at Deserialiser.prefinish (_stream_transform.js:137:10)
at emitNone (events.js:106:13)
at Deserialiser.emit (events.js:208:7)
at prefinish (_stream_writable.js:593:14)
at finishMaybe (_stream_writable.js:601:5)
at endWritable (_stream_writable.js:612:3)
at Deserialiser.Writable.end (_stream_writable.js:563:5)
at Socket.onend (_stream_readable.js:595:10)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
-1:05.9.0 core:save (input.hidden-input)
-0:43.8.0 editor:toggle-line-comments (input.hidden-input)
-0:43.5.0 core:save (input.hidden-input)
2x -0:22.7.0 datatip:toggle (input.hidden-input)
-0:22.3.0 pane:show-next-item (input.hidden-input)
-0:22.1.0 datatip:toggle (input.hidden-input)
3x -0:20.1.0 core:move-down (input.hidden-input)
-0:19.2.0 core:close (input.hidden-input)
-0:18.4.0 datatip:toggle (input.hidden-input)
2x -0:18.3.0 pane:show-previous-item (input.hidden-input)
-0:18 datatip:toggle (input.hidden-input)
-0:16.5.0 core:save (input.hidden-input)
3x -0:15.7.0 core:undo (input.hidden-input)
-0:14.4.0 core:redo (input.hidden-input)
-0:13.8.0 core:save (input.hidden-input)
2x -0:12.8.0 core:move-down (input.hidden-input)
Describe the bug
Timed-out tests result in empty message in the console.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A message "test timed out" should appear, or at least something more meaningful
Screenshots
Especially visible when using Mocha's watch mode.
Changing something in configuration has no effect on current session and a window reload is required. Hook into Atom's config observers and update settings when something changes.
Only the top-most project folder is used at this time, and a socket is also created only for this folder. For windows with multiple projcect folders added this is not ideal.
Also, sometimes it could happen that Atom returns an empty array in atom.project.getPaths()
when IDE-Mocha is activated, which results in a deprecation warning and a socket with weird name.
We are sending all the data over the socket to Atom but we can allow users to customise the log verbosity in the console:
full
- show everything (current state)min
- show only final summarysilent
- show only errors. Users will rely on Busy spinner to monitor progress.suite
- show only suite titlesDescribe the bug
When I save a document and my tests are run, the console pops up and steals my focus
To Reproduce
Steps to reproduce the behavior:
nodemon -w test --exec mocha ...
Expected behavior
I would like to have (at least) the option to not have this seal my focus. I save this file every few seconds and I don't want to switch back to my editor window manually.
Desktop (please complete the following information):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.