jasmine-async-suite
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "jasmine-async-suite", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Adds async function to jasmine suite function that expect promises for asynchronous tests", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,16 @@ # jasmine-async-suite | ||
To install: | ||
```js | ||
var jasmineAsync = require('jasmine-async-suite'); | ||
jasmineAsync.install(); | ||
``` | ||
Uninstalling: | ||
```js | ||
afterAll(function() { | ||
var jasmineAsync = require('jasmine-async-suite'); | ||
jasmineAsync.uninstall(); | ||
}); | ||
``` | ||
For example the following async test: | ||
@@ -14,3 +28,3 @@ ```js | ||
it('passes when enough time has passed, function(done) { | ||
it('passes when enough time has passed', function(done) { | ||
timeout().then(done); | ||
@@ -22,3 +36,3 @@ }); | ||
```js | ||
it.async('passes when enough time has passed, function() { | ||
it.async('passes when enough time has passed', function() { | ||
return timeout(); | ||
@@ -30,3 +44,3 @@ }); | ||
```js | ||
it.async('passes when enough time has passed, async function() { | ||
it.async('passes when enough time has passed', async function() { | ||
await timeout(); | ||
@@ -36,2 +50,2 @@ }); | ||
(c) Copyright 2016 Ryan Dy. All Rights Reserved. | ||
(c) Copyright 2016 Ryan Dy. All Rights Reserved. |
4434
47