raathigesh / majestic Goto Github PK
View Code? Open in Web Editor NEW⚡ Zero config GUI for Jest
License: MIT License
⚡ Zero config GUI for Jest
License: MIT License
🎁 Feature request
N/A
How does one specify env vars for running tests? I have npm scripts setup to initialise env vars before running tests like these:
...
"scripts": {
"test": "better-npm-run test",
},
"betterScripts": {
"test": {
"command": "jest --coverage",
"env": {
"LOG_LEVEL": "silent",
"NODE_ENV": "test"
}
}
},
"jest" : { ... }
...
With majestic, I cannot set these in the UI since there is no such option and majestic seems to be not using the npm scripts.
Show toast message to let the user know that there is an update available. Currently it just shows in the sidebar footer which is not prominent enough.
Great project
It would be amazing to integrate this with the output of Istanbul to determine coverage too!
it's a bug 🐛.
At the moment looks like the regex exp is not working when clicking the single test run button
Looking the problem the regex ^should return error 404$
is not working did try to run it on jest-cli
when I run it should return error 404
it works without problem
jest-cli
The interface appears to be quite wide, at least on my screen (1440x900 MBP), and even when I put it full screen, a little bit gets chopped off on the sides. It would be better if it were either responsive, or perhaps narrower. Also, as an easy space gaining mechanism, the left sidebar could be made collapsible - once you're within a certain folder context, you may not need to jump around much.
Lovely project in general 👍
Bug
I was attempting to make a sandbox, but npx majestic
automatically opens a window, which doesn't work in that environment.
I'd recommend npx majestic --open
for launching a window (print the server address by default), or npx majestic --no-open
to prevent it.
Anyway, my project has a syntax error preventing the tests from even running, so this error appears in the console, but not in the UI:
{
"changeToResult": {
"path": "/Users/eric/Projects/ericclemmons/back-to-the-fixture/example/__tests__/graphql.test.ts",
"numFailingTests": 0,
"numPassingTests": 0,
"failureMessage": " \u001b[1m● \u001b[22mTest suite failed to run\n\n TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):\n \u001b[96msrc/index.ts\u001b[0m:\u001b[93m5\u001b[0m:\u001b[93m29\u001b[0m - \u001b[91merror\u001b[0m\u001b[90m TS2552: \u001b[0mCannot find name 'Recorder'. Did you mean 'recorder'?\n\n \u001b[7m5\u001b[0m export const recorder = new Recorder();\n \u001b[7m \u001b[0m \u001b[91m ~~~~~~~~\u001b[0m\n",
"testResults": [],
"consoleLogs": null,
"__typename": "TestFileResult"
}
}
Feature Request: Does this work with other frameworks? Looks like a good app, and will download once I know if I can configure it for running tests with Angular.
We have a requirement to run our jest tests synchronously which requires the jest flag '-i'. I tried using the runScripts attribute by adding this to package.json:
"majestic": { "runScript": "jest -i" }
But after I do this and run majestic, two things happen.
I tried to reproduce on simple demo project and after adding the runScript I get the same error when trying to run. If I continually hit F5 to refresh the page, the tests on the left pane sometimes show up and sometimes don’t. (on the larger app they never show up)
Anyone know what is going on? Am I missing something that will allow me to use the runScript attribute?
A lot of projects add flags to their jest calls under a script labelled test
in their package.json. We should probably support this preferentially, and then default back to running yarn jest
directly.
Hey,
Im not sure if I use your VSC plugin correctly. To debug a test, first I have to go to VSC and set breakpoint by myself. Then switch to Majestic, press "Start debugging in VS Code" button, go back to VSC by myself (it doesn't open editor automatically like "open editor and go to this test" button) to eventually debug 😅
I would expect that when I click debug button, VSC opens my test in debug mode with breakpoint set at first assertion.
Do I miss something or was it so planned?
BTW. If you go to "show all failures" and try to debug - nothing happens.
Please specify whether this is a feature request 🎁 or a bug 🐛. bug
I did
app > npm run linux
> [email protected] linux /home/hoschi/src/majestic/app
> npm run compile && node_modules/.bin/build --linux
> [email protected] compile /home/hoschi/src/majestic/app
> electron-webpack
51% [0] chunk asset optimization
/home/hoschi/src/majestic/app/node_modules/source-map/lib/source-map-generator.js:276
throw new Error(
^
Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead
of an object with empty or null values.
at SourceMapGenerator_validateMapping [as _validateMapping] (/home/hoschi/src/majestic/app/node_modules/source-map/lib/source-map-generator.js:276:15)
at SourceMapGenerator_addMapping [as addMapping] (/home/hoschi/src/majestic/app/node_modules/source-map/lib/source-map-generator.js:110:12)
at /home/hoschi/src/majestic/app/node_modules/source-map/lib/source-map-generator.js:72:17
at Array.forEach (<anonymous>)
at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (/home/hoschi/src/majestic/app/node_modules/source-map/lib/source-map-consumer.js:157:14)
at Function.SourceMapGenerator_fromSourceMap [as fromSourceMap] (/home/hoschi/src/majestic/app/node_modules/source-map/lib/source-map-generator.js:48:24)
at SourceMapSource.node (/home/hoschi/src/majestic/app/node_modules/webpack-sources/lib/SourceMapSource.js:32:35)
at /home/hoschi/src/majestic/app/node_modules/webpack-sources/lib/ConcatSource.js:59:50
at Array.map (<anonymous>)
at ConcatSource.node (/home/hoschi/src/majestic/app/node_modules/webpack-sources/lib/ConcatSource.js:58:63)
at ConcatSource.proto.sourceAndMap (/home/hoschi/src/majestic/app/node_modules/webpack-sources/lib/SourceAndMapMixin.js:30:18)
at getTaskForFile (/home/hoschi/src/majestic/app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:33:30)
at chunk.files.forEach.file (/home/hoschi/src/majestic/app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:91:21)
at Array.forEach (<anonymous>)
at /home/hoschi/src/majestic/app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:89:18
at Array.forEach (<anonymous>)
at Compilation.<anonymous> (/home/hoschi/src/majestic/app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:88:12)
at Compilation.applyPlugins1 (/home/hoschi/src/majestic/app/node_modules/tapable/lib/Tapable.js:75:14)
at self.applyPluginsAsync.err (/home/hoschi/src/majestic/app/node_modules/webpack/lib/Compilation.js:670:11)
at next (/home/hoschi/src/majestic/app/node_modules/tapable/lib/Tapable.js:202:11)
at Compilation.compilation.plugin (/home/hoschi/src/majestic/app/node_modules/webpack/lib/ProgressPlugin.js:119:6)
at next (/home/hoschi/src/majestic/app/node_modules/tapable/lib/Tapable.js:204:14)
at Compilation.compilation.plugin (/home/hoschi/src/majestic/app/node_modules/webpack/lib/BannerPlugin.js:67:5)
at next (/home/hoschi/src/majestic/app/node_modules/tapable/lib/Tapable.js:204:14)
at Compilation.<anonymous> (/home/hoschi/src/majestic/app/node_modules/babel-minify-webpack-plugin/dist/index.js:119:11)
at Compilation.applyPluginsAsyncSeries (/home/hoschi/src/majestic/app/node_modules/tapable/lib/Tapable.js:206:13)
at self.applyPluginsAsync.err (/home/hoschi/src/majestic/app/node_modules/webpack/lib/Compilation.js:666:10)
at next (/home/hoschi/src/majestic/app/node_modules/tapable/lib/Tapable.js:202:11)
at Compilation.compilation.plugin.callback (/home/hoschi/src/majestic/app/node_modules/webpack/lib/ProgressPlugin.js:115:6)
at Compilation.applyPluginsAsyncSeries (/home/hoschi/src/majestic/app/node_modules/tapable/lib/Tapable.js:206:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] compile: `electron-webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/hoschi/.npm/_logs/2018-01-12T13_05_18_701Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] linux: `npm run compile && node_modules/.bin/build --linux`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] linux script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/hoschi/.npm/_logs/2018-01-12T13_05_18_709Z-debug.log
When loading majestic over an https
connection, the client attempts to connect over ws
not wss
.
It seems the apollo http link will require https
too.
I pointed Majestic at a project that is built with Preact. Once I started Majestic and ran the test suite, I noticed the "Tests" column and the main output area were empty. The "Show all failures" also did nothing.
Screenshot:
Not sure what is causing this, and I tried restarting Majestic and re-opening the project several times. My Jest config:
"jest": {
"collectCoverage": true,
"coverageReporters": [ "html" ],
"snapshotSerializers": [
"jest-serializer-html-string"
]
}
I've been thinking about this for a while so let me put those into words here.
I love electron for what it enables but every app out there does not need to be an electron app. Majestic made perfect sense as an electron app but maintaining it for multiple platforms takes effort. So I'm thinking of experimenting by porting majestic as an npm module with a web interface.
npm install majestic-cli -g
majestic
in a terminal in a directory with a jest projectThe node process would communicate with the web UI via web socket.
Alm tools uses the same approach - https://github.com/alm-tools/alm
Yes? No? Feel free to voice your thoughts below!
feature request
Version of Majestic: alpha
Version of Jest: 22.2.1
Version of Node: 11.2
Operating System: mac OS X Mojave
In jest you can group tests together using a describe block. It would be very handy and useful to represent this in majestic in the same way. Also it should be possible to run all the tests, that are inside that describe-block.
In my jest config I have set roots
to ["<rootDir>/a/b/c/d"]
because I have all my tests from "d" and under, and there could be other tests that I do not want included from the other dirs.
My testMatch
however is set to "**/__tests__/**/*.test.(js|jsx)"
which I guess is the reason for some tests showing up in the tree structure under "Tests"?
I cannot however run those tests from majestic/jest since it doesn't match the active filter pattern.
So to be clear, the tree structure looks like this now.
rootDir
/a
/b
__tests__/
- do-not-show-me.test.js
/c
/d
__tests__/
- first.test.js
bug 🐛.
Please specify whether this is a feature request 🎁 or a bug 🐛: bug
https://github.com/hoschi/yode
cd packages/core
majestic
expect(result.functions).toHaveLength(0)
from 0 to 1Expected: Tests were run again like in jests watch mode
Actual: Nothing happens
Please specify whether this is a feature request 🎁 or a bug 🐛.
Here is my jest configuration "jest": { "verbose": true, "collectCoverage": true, "coverageReporters": ["html"] }
My jest config is really minimal, so my tests are able to run, however I get nothing in the sidebar for all my tests, and when I click show failures nothing happens. My tests are in a directory formatted like this tests/{components}/{componentname}.tests.js.
🐛
Please specify whether this is a feature request 🎁 or a bug 🐛.
The "output" is env: node: No such file or directory
Maybe run nvm use
in the directory if nvm is available?
When I attempt to run all tests or individual tests, I receive the following error:
execvp(3) failed.: No such file or directory
Jest config is in package.json
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx}",
"!src/registerServiceWorker.js",
"!src/Components/**/index.js",
"!src/Components/StaticDevContent/*",
"!src/actions/showStaticContent.js",
"!src/reducers/showStaticContent.js"
],
"coverageReporters": [
"lcov"
],
"setupFiles": [
"<rootDir>/config/polyfills.js",
"jest-localstorage-mock"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.js?(x)",
"<rootDir>/src/**/?(*.)(spec|test).js?(x)"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web"
}
},
bug
After a "run files"-test with multiple tests, successful tests become green and unsuccessful tests are becoming red.
If you rerun a "red" test for example, the complete view is being rerendered instead of just the single test. So all the other tests are resetted (becoming blue) and you loose overview about which tests were failing.
This is a bug.
I have three monitors, if I open up the Show Output popdown I get this bug. Running the program not at full screen fixes it. Monitors are 2560 x 1440 with normal scaling.
If it isn't clear in the picture, the app is running at full screen, the black bar is another program running at full screen on another monitor.
Please specify whether this is a feature request 🎁 or a bug 🐛: bug
https://github.com/hoschi/yode
cd packages/core
majestic --app
Expected: Chrome starts in app mode showing majestic UI
Actual:
core > majestic --app
Majestic v1.1.0
Zero config UI for Jest
Shows up but nothing happens.
Bug
Tried running this in the bolt repo. When selecting a test file and hitting debug I get this message in my console
(node:78902) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): FetchError: request to http://localhost:9229/json failed, reason: connectECONNREFUSED 127.0.0.1:9229
(node:78902) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
ps stderr: Debugger listening on ws://127.0.0.1:9229/5733f978-d2d6-416d-ae8e-d5c81de99bf7
For help see https://nodejs.org/en/docs/inspector
When I hit it a second time, I get this message
ps stderr: Starting inspector on 127.0.0.1:9229 failed: address already in use
But it also opens the flag with the link correctly, interestingly.
I don't believe I have any other debuggers open, I'll investigate a bit more later.
Just raising here as an fyi
Probably TravisCI, unless anyone has any strong opinions?
Feature request
Using the file search, I think it would make more sense to have the file with a name matching the search be at the top. I assume the other search results are files containing what I typed?
Please can you provide a .deb install file for Linux Debian (includes Ubuntu) distros.
n/a
Thank you for this awesome tool! ❤️
🎁 Feature Request
Is it possible to release master
in the near future? v0.1.0
has a few issues that are resolved on master
. #2 is fixed in master
but not in the download available on the site, so I'm running the dev version for now.
Also, ideally Majestic would automatically check for updates and offer a prompt to download. I haven't used it, but perhaps this package would help with adding that feature? https://github.com/zeit/hazel
N/A
Thank you so much! 🙌
Bug
majesticsetup0.1.0.exe currently requires elevated permissions (UAC) in order to run. Is this necessary? Is there any way to generate an exe that doesn't require it?
It's a blocker for many developers running in locked-down corporate environments that cannot freely install software that requires elevated permissions to run.
Thanks again and can't wait to try it out!
Bug report.
When I load a project in Windows 10, nothing shows up and running tests is not possible. I loaded the same project in OS X and was able to see my directory tree and run tests.
Hello! Not an issue per say, but a question. I just pulled down the project and i noticed there was a button to update the snapshot of an individual file. I was wondering if there was a way to update all snapshots from within the project? I know jest has a cmd to update all snaps, but I think it would be dope if Majestic had an update all button or something, if it doesnt already.
I love the software and its brillant! Great work!
This is a plan to make majestic more awesome with version 1
Extract the main UI and the main business logic as a core library and implement a thin communication adapter so it could be used to talk to electron via IPC messages.
Electron is great but not everyone is a fan of it. Moving electron away from the core implementation would enable us to distribute majestic as an npm module. npx majestic
would open the UI in the browser.
The CLI and the UI would use web sockets to communicate through the communication adapter from the core.
A lot could be done to make the UI better.
The goal of this re-write is to make Majestic a tool where everyone writing tests in jest would love to have next to them.
Feel free to share your thoughts!
As discussed in the initial PR - still unsolved.
Aim:
To avoid the step described in the readme, but only do it in development mode of course.
I have a bootstrap script for new engineers on my project, and we install apps alongside our repo dependencies using brew cask install <app-dep>
. It'd be neat if majestic supported this!
Console output is just single color string now. Colorize with https://github.com/rburns/ansi-to-html
bug 🐛
In the Execution Summary section, the "Test Suite" heading is misspelled.
It looks like a simple fix to test-summary.tsx is required:
<span>Test Suites</span>
🎁
I'm currently using the async generator-functions
feature from Babel, which requires me to pass the flag --harmony-async-iteration
to node.
When I run jest from the CLI, I must run it like this:
node --harmony-async-iteration ./node_modules/.bin/jest --config jest.config.json
I tried pasting this command into the runScript
parameter for Majestic, but I believe Majestic is doing some "smart" parsing of that string which rearranges the Jest parameters incorrectly and passes them to the node
process instead.
So in the Debug Console within Majestic, it prints out warnings like Unrecognized option --json
etc.
It would be great if Majestic allowed passing custom parameters to node!
Unless I'm missing something there aren't any tests! I would recommend this great test runner called "Jest", you might have heard of it 😉.
In all seriousness, the stack you've chosen has a great set of tooling such as:
These tools will make maintaining this project much easier, especially when it comes to trusting code changes you haven't manually tested.
Please specify whether this is a feature request 🎁 or a bug 🐛.: Bug
I am attempting to get the project running locally but when I attempted to install the yarn packages it fails with an error because the upath package is incompatible with node 10.
Ability to debug a particular test in VS Code by clicking a button.
The user has to install the majestic VS Code extension. This extension would connect to a socket server hosted by Majestic.
When user clicks the debug button in Majestic for a particular test, Majestic would instruct the extension to launch the debugger for the specific test.
VS Code allows you to have tasks defined in the launch.json. By default majestic would inject a launch task on the fly and use it to start the debugging session. But if there is a task with the name majestic
configured, then that task would be used. This allows users to configure custom debugging tasks if they needs to.
This is a 🐛
AssertionError {
name: "AssertionError",
actual: "",
expected: true,
operator: "==",
message: "missing path"…
}
at Module.require (module.js:496:3)↵ at require (internal/module.js:20:19)↵ at a (file:///Applications/Majestic.app/Contents/Resources/app.asar/renderer.js:1:774)↵ at t.c (file:///Applications/Majestic.app/Contents/Resources/app.asar/renderer.js:1:1893)↵ at s (file:///Applications/Majestic.app/Contents/Resources/app.asar/renderer.js:1:4076)↵ at We.loadTestFiles (file:///Applications/Majestic.app/Contents/Resources/app.asar/renderer.js:3:7612)↵ at y.then (file:///Applications/Majestic.app/Contents/Resources/app.asar/renderer.js:3:8287)↵ at <anonymous>"__proto__: Error
Maybe I am doing something wrong, but this is what happens when I try to build the project:
jest-editor-support
from jestgit clone [email protected]:Raathigesh/majestic.git
cd majestic
git checkout v0.1.0
yarn
yarn linux
Then the following errors occours:
paulo@debian [02:56:23 PM] [~/src/majestic] [8ae1152]
-> % yarn linux
yarn run v1.3.2
$ npm run compile && node_modules/.bin/build --linux
> [email protected] compile /home/paulo/src/majestic
> electron-webpack
[1] Hash: 3a7fad97de5c77276a94607ec2b6f604ca46244a
Version: webpack 3.8.1
Child
Hash: 3a7fad97de5c77276a94
Time: 40155ms
2 assets
[1] multi ./src/main/index.ts 28 bytes {0} [built]
[2] ./src/main/index.ts + 1 modules 3.98 kB {0} [built]
+ 1 hidden module
ERROR in /home/paulo/src/majestic/src/renderer/stores/Workspace.ts
[tsl] ERROR in /home/paulo/src/majestic/src/renderer/stores/Workspace.ts(4,46)
TS2307: Cannot find module './runner'.
ERROR in /home/paulo/src/majestic/src/renderer/stores/Runner.ts
[tsl] ERROR in /home/paulo/src/majestic/src/renderer/stores/Runner.ts(169,7)
TS2554: Expected 1 arguments, but got 2.
ERROR in /home/paulo/src/majestic/src/renderer/components/quick-search.tsx
[tsl] ERROR in /home/paulo/src/majestic/src/renderer/components/quick-search.tsx(5,24)
TS2307: Cannot find module 'classNames'.
Child
Hash: 607ec2b6f604ca46244a
Time: 52633ms
11 assets
[8] multi ./src/renderer/index.ts 28 bytes {0} [built]
[9] ./src/renderer/index.ts + 26 modules 38 kB {0} [built]
[11] ./src/renderer/stores/Workspace.ts 323 bytes {0} [built] [failed] [2 errors]
[12] ./src/renderer/assets/logo.png 67 bytes {0} [built]
[17] ./src/renderer/style.css 41 bytes {0} [built]
[28] ./node_modules/css-loader!./src/renderer/style.css 1.82 kB [built]
+ 23 hidden modules
ERROR in ./src/renderer/stores/Workspace.ts
[tsl] ERROR in /home/paulo/src/majestic/src/renderer/stores/Workspace.ts(4,46)
TS2307: Cannot find module './runner'.
ERROR in /home/paulo/src/majestic/src/renderer/stores/Runner.ts
[tsl] ERROR in /home/paulo/src/majestic/src/renderer/stores/Runner.ts(169,7)
TS2554: Expected 1 arguments, but got 2.
ERROR in ./src/renderer/components/quick-search.tsx
[tsl] ERROR in /home/paulo/src/majestic/src/renderer/components/quick-search.tsx(5,24)
TS2307: Cannot find module 'classNames'.
ERROR in ./src/renderer/components/quick-search.tsx
Module build failed: Error: Typescript emitted no output for /home/paulo/src/majestic/src/renderer/components/quick-search.tsx.
at successLoader (/home/paulo/src/majestic/node_modules/ts-loader/dist/index.js:47:15)
at Object.loader (/home/paulo/src/majestic/node_modules/ts-loader/dist/index.js:29:12)
@ ./src/renderer/Container.tsx 8:0-52
@ ./src/renderer/app.tsx
@ ./src/renderer/index.ts
@ multi ./src/renderer/index.ts
ERROR in ./src/renderer/stores/Workspace.ts
Module build failed: Error: Typescript emitted no output for /home/paulo/src/majestic/src/renderer/stores/Workspace.ts.
at successLoader (/home/paulo/src/majestic/node_modules/ts-loader/dist/index.js:47:15)
at Object.loader (/home/paulo/src/majestic/node_modules/ts-loader/dist/index.js:29:12)
@ ./src/renderer/app.tsx 6:0-43
@ ./src/renderer/index.ts
@ multi ./src/renderer/index.ts
Child html-webpack-plugin for "index.html":
1 asset
[0] ./node_modules/html-loader?minimize=false!/__virtual__/renderer-index.html 278 bytes {0} [built]
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js!src/renderer/style.css:
[0] ./node_modules/css-loader!./src/renderer/style.css 1.82 kB {0} [built]
+ 1 hidden module
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js!node_modules/@blueprintjs/core/dist/blueprint.css:
6 assets
8 modules
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] compile: `electron-webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/paulo/.npm/_logs/2018-01-09T16_59_01_302Z-debug.log
error Command failed with exit code 2
This also happens on the master branch (other files, but Cannot find module
errors too), is there something I am missing here 🤔 ?
Feature request 🎁
We console log most of the time to quickly see the values variables are holding. But it could be overwhelming to find the conole.log results when you have thousands of lines printed to the console.
This is a crazy idea to make that work with the luxury of the UI we have in majestic. You would still use the good old console.log but instead of logging just the value, you would prepend it with a unique pattern like #^<yourValue>^#
or $#<yourValue>#$
, then majestic would go pick these values up and show it you in a UI, as I call it, The debug window
.
This is still an early idea. Will try to put together a POC and see how it goes.
Feature request
We use jest describe to group our tests, but this information doesn't appear to be captured in the Majestic test reporter. It has the test name, but isn't prepending the describe name.
Bug 🐛
It seems like Majestic just runs 'jest --watch' in your project directory, but for projects that don't use git or hg, it displays an error:
--watch is not supported without git/hg, please use --watchAll
This is related to this issue: jestjs/jest#4737
Perhaps there should be an option to use --watchAll? Or, if you want to keep it zero-config, have it check for that error and re-try using --watchAll.
I can't make a repo because the bug won't occur in a git repo. It only occurs in projects that do not use git/hg.
Please specify whether this is a feature request or a bug.
Run majestic and run your tests. Once run if you have multiple outputs from a test you cannot scroll down to read them completely. Can't provide GH repo since It's a private source for my company.
My majestic op conf:
"majestic": {
"args": ["--env=jsdom", "--config jest.conf.json", "-u"],
"env": {
"NODE_PATH": "src"
}
🐛.
This is my configuration on package.json
"jest": {
"moduleDirectories": [
"./ui-lib/src",
"./ui-lib/node_modules",
"node_modules",
"./obs",
"./obs/node_modules"
],
"moduleNameMapper": {
"^.+\\.(jpg|jpeg|png|gif|eot|webp|svg|ttf|woff|woff2)$": "<rootDir>/jest/fileMock.js",
"^.+\\.(css|scss)$": "identity-obj-proxy",
"frontend/ui-lib(.*)$": "<rootDir>/ui-lib/$1"
},
"transform": {
"^.+\\.js?$": "babel-jest",
".*": "<rootDir>/node_modules/jest-css-modules"
},
"transformIgnorePatterns": [
"/node_modules/(?!(frontend)/).*/",
"obs/node_modules/(?!(frontend)/).*/"
],
"setupFiles": [
"raf/polyfill",
"<rootDir>/jest.init.js"
],
"collectCoverage": true,
"coverageDirectory": "./coverage",
"coverageReporters": [
"html",
"text-summary"
]
},
No files are shown up in the sidebar, when I press the run test, nothing happens. No error displayed either though.
Feature request
Jest reports a bit of context for the test failure which I find very helpful, whereas Majestic only reports the stack trace. Wondering if the lines highlighted in yellow in my picture below could be included in the Majestic report?
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.