The Quokka extension provides a seamless testing experience within Visual Studio Code. With Quokka, you can easily create new files for trying out code using the command palette. As you type, Quokka automatically runs and displays the output of each
console.log line, allowing you to observe results in real-time.
Follow one of these options to install it.
- Search for
WallabyJs.quokka-vscodein VS Code Extensions panel and hit install.
- Install via the Visual Studio Code Marketplace →.
Quokka is an excellent companion for practicing algorithms and enhancing your overall learning experience. As you write code, Quokka provides visual cues by displaying red or green squares on the left side of each line, indicating the presence or absence of errors.
Furthermore, Quokka allows you to import and test node modules that are already a part of your project, expanding its usefulness beyond isolated code snippets.
You can activate Quokka on a per-file basis or selectively evaluate specific code sections. This flexibility empowers you to experiment and test parts of your code without disrupting the entire project.
const add = (a, b) => a + b;
add(2, 3); // Output: 5
Quokka comes with a range of features designed to enhance your development workflow.
Quokka provides real-time execution feedback within the editor. You can open a new Quokka file or restart Quokka on an existing file using convenient keyboard shortcuts
Cmd/Ctrl + K Tfor TypeScript
The execution output is displayed in the Quokka Console, accessible through the "Show Output" command or the status bar indicator.
With Quokka, you can utilize
console.log or identifier expressions to log and compare values. Sequence expressions allow you to perform comparisons on objects, making it easier to examine and validate your code's behavior.
With the Quokka Value Explorer, you gain valuable insights into your code's behavior. The Value Explorer displays the values of logged variables, making it easy to track their changes as you modify your code.
Quokka's "Time Machine" feature allows you to debug files step by step, providing a powerful tool to pinpoint and resolve issues in your code. Additionally, Quokka enables you to effortlessly share your scratchpad via codeclip.io with just a single button click, promoting collaboration and knowledge sharing among developers.
For more features and details check out the official docs https://quokkajs.com/