You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2020/08/06 11:12:16 UTC

[cordova-plugin-test-framework] 01/04: FR-44 : Update Jasmine version and documentation

This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch feat/jasmine-upgrade
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-test-framework.git

commit 6c35d5ef74dd84b620d63476ae91fed277e92910
Author: Sven Emtell <sv...@doremir.com>
AuthorDate: Thu Oct 10 11:25:15 2019 +0200

    FR-44 : Update Jasmine version and documentation
---
 README.md | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 37cc691..614eea3 100644
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@ The `cordova-plugin-test-framework` plugin will automatically find all `tests` m
 
 ### Defining Auto Tests
 
-Export a function named `defineAutoTests`, which defines your auto-tests when run. Use the [`jasmine-2.0`](http://jasmine.github.io/2.0/introduction.html) format. E.g.:
+Export a function named `defineAutoTests`, which defines your auto-tests when run. Use the [`jasmine-2.9`](https://jasmine.github.io/2.9/introduction.html) format. E.g.:
 
 ```
 exports.defineAutoTests = function() {
@@ -87,13 +87,26 @@ exports.defineAutoTests = function() {
       ...
     });
 
-    it('do something async', function(done) {
+    it('do something async using callbacks', function(done) {
       setTimeout(function() {
         expect(1).toBe(1);
         ...
         done();
       }, 100);
     });
+
+    it("do something async using promises", function() {
+      return soon().then(function() {
+        value++;
+        expect(value).toBeGreaterThan(0);
+      });
+    });
+
+    it("do something async using async/await", async function() {
+      await soon();
+      value++;
+      expect(value).toBeGreaterThan(0);
+    });
   });
 
   describe('more awesome tests', function() {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org