Jasmine Scaffold
Scaffold out your Jasmine tests without the JS
Details
Installs
- Total 1K
- Win 659
- Mac 473
- Linux 209
| Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Jasmine Scaffold
A Sublime Text plugin to help scaffold out your Jasmine tests without the JS.
Installation
You can install via Sublime Package Control.
Open 'Package Control: Install Package' in your Command Palette and search for 'jasmine scaffold'.
The plugin should be picked up automatically. If not then you may need to restart Sublime Text.
Usage
- Write your specifications in plain English, indenting where required. e.g.
a unit of code
when correctly initialised
should run the desired functionality
when incorrectly initialised
should return the correct error
Run Jasmine Scaffold (you can run for the whole file or highlight a selection of your file and run only for that):
- Ctrl Cmd Shift + J for OSX users
Ctrl Alt Shift + J for Windows & Linux users
or
Right click within the file editor area and click 'Run Jasmine Scaffold'
Your specification will immediately be formatted into JavaScript code ready for tests to be added. e.g.
describe('a unit of code', function() {
describe('when correctly initialised', function() {
it('should run the desired functionality', function() {
});
});
describe('when incorrectly initialised', function() {
it('should return the correct error', function() {
});
});
});
Contributing
Contributions are more than welcome, no matter how large or small. The workflow I used for working on the plugin as follows (YMMV):
On your command line navigate to the packages folder for Sublime Text, which by default for Sublime Text 3 is located at
Users\”Username”\Library\Application Support\Sublime Text 3\Packageson OSX andC:\Users\”Username”\AppData\Roaming\Sublime Text 3\Packageson Windows.Fork the project within GitHub.
Clone your fork &
cdinto it
git clone git@github.com:"Username"/jasmine-scaffold-sublime-text.git & cd jasmine-scaffold-sublime-text
You'll then be able to test the plugin as you make changes directly in Sublime Text. There are sample files to test on within the test directory.
Commit your work, push it to GitHub and submit a pull request with an explanation of the patch.
License
Released under the MIT license: opensource.org/licenses/MIT