diff --git a/jasmine-async-await/unit-tests/js-3.6.0/SpecRunner.html b/jasmine-async-await/unit-tests/js-3.6.0/SpecRunner.html
index 24d9731..d0a2ce0 100644
--- a/jasmine-async-await/unit-tests/js-3.6.0/SpecRunner.html
+++ b/jasmine-async-await/unit-tests/js-3.6.0/SpecRunner.html
@@ -13,15 +13,17 @@
-
+
+
-
+
+
diff --git a/jasmine-async-await/unit-tests/js-3.6.0/spec/ListObjFormatSpec.js b/jasmine-async-await/unit-tests/js-3.6.0/spec/ListObjFormatSpec.js
new file mode 100755
index 0000000..b4eaf4d
--- /dev/null
+++ b/jasmine-async-await/unit-tests/js-3.6.0/spec/ListObjFormatSpec.js
@@ -0,0 +1,12 @@
+it('compares some lists', function() {
+ const expectedListOfPersons = [
+ {name: 'Tom', age:20, dob: '20/10/2000'},
+ {name: 'John', age:30, dob: '20/10/1990'}
+ ];
+ const actualListOfPersons = [
+ {name: 'Thomas', age:20, dob: '20/10/2000'},
+ {name: 'Johnny', age:30, dob: '20/10/1990'}
+ ];
+
+ expect(actualCells).toEqual(expectedCells);
+});
diff --git a/jasmine-async-await/unit-tests/js-3.6.0/spec/MockClockSpec.js b/jasmine-async-await/unit-tests/js-3.6.0/spec/MockClockSpec.js
index 64e6fd5..20e61ac 100755
--- a/jasmine-async-await/unit-tests/js-3.6.0/spec/MockClockSpec.js
+++ b/jasmine-async-await/unit-tests/js-3.6.0/spec/MockClockSpec.js
@@ -1,13 +1,22 @@
describe('debounced test', function(){
+function displayPerson(p){
+
+ var p1 = p[0];
+ var p2 = p[1];
+ return p1.name + ',' + p1.dob + '||' + p2.name + ',' + p2.dob;
+ //return '--Person name-- - ' + p.name + ',' + p.dob;
+}
+
beforeEach(function(){
- jasmine.clock().install();
+ //jasmine.clock().install();
+ jasmine.addCustomObjectFormatter(displayPerson);
});
afterEach(function(){
- jasmine.clock().uninstall();
+ //jasmine.clock().uninstall();
});
-
+/*
it('should call the method only after the 500ms debounce', function(){
function debouncedMethod() {
// do something async;
@@ -24,4 +33,17 @@ describe('debounced test', function(){
//assertions follow
});
+*/
+ it('compares some lists', function() {
+ const expectedListOfPersons = [
+ {name: 'Tom', age:20, dob: '20/10/2000'},
+ {name: 'John', age:30, dob: '20/10/1990'}
+ ];
+ const actualListOfPersons = [
+ {name: 'Thomas', age:20, dob: '20/10/2000'},
+ {name: 'Johnny', age:30, dob: '20/10/1990'}
+ ];
+
+ expect(actualListOfPersons).toEqual(expectedListOfPersons);
+ });
});
\ No newline at end of file
diff --git a/jasmine-async-await/unit-tests/js-3.6.0/spec/spyjasminespec.js b/jasmine-async-await/unit-tests/js-3.6.0/spec/spyjasminespec.js
new file mode 100755
index 0000000..db684b9
--- /dev/null
+++ b/jasmine-async-await/unit-tests/js-3.6.0/spec/spyjasminespec.js
@@ -0,0 +1,17 @@
+describe("Example Of jasmine Spy using spyOn()", function() {
+
+ it('uses the dictionary to say "hello world"', function() {
+ var dictionary = new Dictionary;
+ var person = new Person;
+
+ spyOn(dictionary, "hello"); // replace hello function with a spy
+ spyOn(dictionary, "world"); // replace world function with another spy
+
+ person.sayHelloWorld(dictionary);
+ expect(dictionary.hello).toHaveBeenCalled();
+ // not possible without first spy
+
+ expect(dictionary.world).toHaveBeenCalled();
+ // not possible withoutsecond spy
+ });
+});
\ No newline at end of file
diff --git a/jasmine-async-await/unit-tests/js-3.6.0/src/spyjasmine.js b/jasmine-async-await/unit-tests/js-3.6.0/src/spyjasmine.js
new file mode 100755
index 0000000..d4d8735
--- /dev/null
+++ b/jasmine-async-await/unit-tests/js-3.6.0/src/spyjasmine.js
@@ -0,0 +1,15 @@
+var Person = function() {};
+
+Person.prototype.sayHelloWorld = function(dict) {
+ return dict.hello() + " " + dict.world();
+};
+
+var Dictionary = function() {};
+
+Dictionary.prototype.hello = function() {
+ return "hello";
+};
+
+Dictionary.prototype.world = function() {
+ return "world";
+};
\ No newline at end of file