Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fnando/sublime-better-qunit

This is a custom QUnit package, that includes snippets, custom syntax highlighters and more!
https://github.com/fnando/sublime-better-qunit

qunit sublime-text sublime-text-plugin

Last synced: 16 days ago
JSON representation

This is a custom QUnit package, that includes snippets, custom syntax highlighters and more!

Awesome Lists containing this project

README

        

# Better QUnit

This is a custom QUnit package, that includes snippets, custom syntax highlighters and more!

## Installation

### Setup Package Control Repository

1. Follow the instructions from https://sublime.fnando.com.
2. Open the command pallete, run “Package Control: Install Package“, then search for “Better QUnit“.

### Git Clone

Clone this repository into the Sublime Text “Packages” directory, which is located where ever the “Preferences” -> “Browse Packages” option in sublime takes you.

## ApplySyntax configuration

```json
{
"new_file_syntax": "Better Ruby/Ruby",
"reraise_exceptions": true,

"syntaxes": [
{
"name": "Better QUnit/QUnit",
"rules": [
{"file_path": ".*_test\\.js$"}
]
}
]
}
```

## Override Quote Style

By default, snippets use `'` as the preferred quote style. If you want to change it to `"`, just create the file `Packages/Users/QUnit-Quotes.tmPreferences` with the following content:

```xml

name
Quotes
scope
source.js
settings

shellVariables


name
TM_QUOTE
value
"



uuid
0FBD0784-F200-433C-AFFF-7F02BD6F7DB0

```

## Override assert receiver

By default it's all assertion methods will be prefixed with `assert.`. You can disable this behavior by creating a `QUnit-Assert.tmPreferences` file like the following:

```xml

name
Quotes
scope
source.js.qunit
settings

shellVariables


name
QUNIT_ASSERT_PREFIX
value




uuid
0FBD0784-F200-433C-AFFF-7F02BD6F7DB0

```

## Override QUnit receiver

Similarly, some things will use the `QUnit` receiver, like `QUnit.test`. You can disable this behavior by creating a `QUnit-Module.tmPreferences` file like the following:

```xml

name
Quotes
scope
source.js.qunit
settings

shellVariables


name
QUNIT_PREFIX
value




uuid
0FBD0784-F200-433C-AFFF-7F02BD6F7DB0

```