https://github.com/chrisdwheatley/jasmine-scaffold-sublime-text
Scaffold out your Jasmine tests without the JS
https://github.com/chrisdwheatley/jasmine-scaffold-sublime-text
Last synced: 5 months ago
JSON representation
Scaffold out your Jasmine tests without the JS
- Host: GitHub
- URL: https://github.com/chrisdwheatley/jasmine-scaffold-sublime-text
- Owner: chrisdwheatley
- License: mit
- Created: 2014-08-22T21:55:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-05T09:55:49.000Z (about 10 years ago)
- Last Synced: 2024-04-14T19:51:02.388Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 453 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jasmine Scaffold
A Sublime Text plugin to help scaffold out your [Jasmine](https://github.com/jasmine/jasmine) tests without the JS.
### Installation
You can install via [Sublime Package Control](https://packagecontrol.io/installation).
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.
```javascript
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\Packages` on OSX and
`C:\Users\”Username”\AppData\Roaming\Sublime Text 3\Packages` on Windows.* Fork the project within GitHub.
* Clone your fork & `cd` into it
```
git clone [email protected]:"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](http://opensource.org/licenses/MIT)