diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-10-06 05:21:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-06 05:21:44 +0300 |
commit | e59e8c57d613ee8a42951b6525256dc0ceb0b061 (patch) | |
tree | b1c883335953db01442a34afbbbf856072ac6ffd /tests/lib/mocha-3.1.0/test/browser/array.spec.js | |
parent | d4ad50fc0f5c24ecb1e25703c9aa284e359120cb (diff) |
Upgrade mocha library for UI tests (#10692)
* Balance the UI tests job, second half currently 8 min longer
* Upgrade mocha to 3.1.0
* rebalance
* Remove old mocha
Diffstat (limited to 'tests/lib/mocha-3.1.0/test/browser/array.spec.js')
-rw-r--r-- | tests/lib/mocha-3.1.0/test/browser/array.spec.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.0/test/browser/array.spec.js b/tests/lib/mocha-3.1.0/test/browser/array.spec.js new file mode 100644 index 0000000000..26404f6a90 --- /dev/null +++ b/tests/lib/mocha-3.1.0/test/browser/array.spec.js @@ -0,0 +1,38 @@ +describe('Array', function(){ + describe('#push()', function(){ + it('should append a value', function(){ + foo = 'asdf' + var arr = []; + arr.push('foo'); + arr.push('bar'); + arr.push('baz'); + assert('foo' == arr[0]); // to test indentation + assert('bar' == arr[1]); + assert('baz' == arr[2]); + }) + + it('should return the length', function(){ + var arr = []; + assert(1 == arr.push('foo')); + assert(2 == arr.push('bar')); + assert(3 == arr.push('baz')); + }) + }) +}) + +describe('Array', function(){ + describe('#pop()', function(){ + it('should remove and return the last value', function(){ + var arr = [1,2,3]; + assert(arr.pop() == 3); + assert(arr.pop() == 2); + assert(arr.pop() == -1); + }) + + it('should adjust .length', function(){ + var arr = [1,2,3]; + arr.pop(); + assert(arr.length == 2); + }) + }) +}) |