# jasmine-set

> Adds rspec-style let function to Jasmine

Latest version **0.1.11** (published 2015-05-16) · 0 weekly downloads

## Install

```sh
npm install jasmine-set
pnpm add jasmine-set
yarn add jasmine-set
bun add jasmine-set
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.11 |
| Published | 2015-05-16 |
| First published | 2014-05-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joe Vennix |
| Maintainers | joev |
| Keywords | jasmine, set, spec, bdd |

## Links

- npm: https://www.npmjs.com/package/jasmine-set
- Repository: https://github.com/joevennix/jasmine-set
- Issues: https://github.com/joevennix/jasmine-set/issues
- npm.io page: https://npm.io/package/jasmine-set

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) ~1.6

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.1.11 (latest) — 2015-05-16
- 0.1.10 — 2015-05-16
- 0.1.9 — 2015-05-15
- 0.1.8 — 2015-01-21
- 0.1.7 — 2014-05-05
- 0.1.6 — 2014-05-05
- 0.1.5 — 2014-05-05
- 0.1.4 — 2014-05-05
- 0.1.2 — 2014-05-05
- 0.1.1 — 2014-05-05
- 0.1.0 — 2014-05-05

## README

[![Build Status](https://travis-ci.org/joevennix/jasmine-set.svg?branch=master)](https://travis-ci.org/joevennix/jasmine-set)

jasmine-set brings rspec's `let` syntax to the [Jasmine](http://jasmine.github.io/) behavior-driven development framework for testing JavaScript code. The `set` global function is provided, which allows the spec writer to define lazy global accessors that can be refined in nested specs. To achieve this behavior, the `Suite.prototype.finish` function from Jasmine is wrapped.

##### Why not `let`?

In Ecmascript, `let` is a reserved word that allows for block-level scoping (as opposed to `var`, which is functionally-scoped).

### Sample Usage

    describe 'House', ->
      set 'opts',  -> {}
      set 'house', -> new House(opts)

      it 'has a door', -> expect(house).toHaveADoor()

      describe 'with no doors', ->
        set 'opts', -> { doors: 0 }

        it 'does not have a door', -> expect(house).not.toHaveADoor()

### Dependencies

- underscore (~1.6)
- node >= 0.8

### Building from source

    $ npm i
    $ grunt build

### Running specs

    $ grunt test

### License

[MIT](http://en.wikipedia.org/wiki/MIT_License)

### Copyright

Rapid7 2014

---
_Source: https://npm.io/package/jasmine-set · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
