ember-cli-test-helpers
Advanced tools
Comparing version 0.6.0 to 0.7.0
{ | ||
"name": "ember-cli-test-helpers", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "A collection of test helpers for ember web applications", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -15,3 +15,3 @@ # ember-cli-test-helpers | ||
## Example usage of helpers can be found in usage-test.js | ||
## Build | ||
``` | ||
@@ -23,2 +23,17 @@ $ npm install | ||
## Usage | ||
Example usage of helpers can be found in usage-test.js. | ||
The wait for helper waits half a second by default, but you can configure this value. | ||
```js | ||
module.exports = function(/* environment, appConfig */) { | ||
return { | ||
APP: { | ||
defaultWaitForTimeout: 1 | ||
} | ||
}; | ||
}; | ||
``` | ||
## License | ||
@@ -25,0 +40,0 @@ |
import Ember from "ember"; | ||
import QUnit from "qunit"; | ||
import config from '../../config/environment'; | ||
var DEFAULT_TIMEOUT = config.APP.defaultWaitForTimeout || 500; | ||
var waitFor = function(callback, timeout) { | ||
timeout = timeout || 500; | ||
timeout = timeout || DEFAULT_TIMEOUT; | ||
stop(); | ||
@@ -11,4 +14,4 @@ Ember.run.later(function(){ | ||
}, timeout); | ||
} | ||
}; | ||
export {waitFor}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13951
13
272
42