mirror of
				https://github.com/tc39/test262.git
				synced 2025-11-03 21:24:30 +01:00 
			
		
		
		
	Assert array equivalency
The `compareArray` utility function returns a boolean value describing whether or not the input arrays are equivalent--it does not throw an exception when invoked with non-equivalent arrays. Prior to this commit, however, two tests invoked `compareArray` without inspecting its return value, so it had no impact on the result of the test. Update the tests to fail when the "expected" and "actual" arrays are not equivalent.
This commit is contained in:
		
							parent
							
								
									43c68163c0
								
							
						
					
					
						commit
						c44cee291a
					
				@ -44,7 +44,7 @@ Promise.all([
 | 
				
			|||||||
    return checkSequence(sequence, 'Expected to be called second.');
 | 
					    return checkSequence(sequence, 'Expected to be called second.');
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
]).then(result => {
 | 
					]).then(result => {
 | 
				
			||||||
  compareArray(result, [true, true, true]);
 | 
					  assert.compareArray(result, [true, true, true]);
 | 
				
			||||||
  assert.sameValue(sequence.length, 5);
 | 
					  assert.sameValue(sequence.length, 5);
 | 
				
			||||||
  checkSequence(sequence);
 | 
					  checkSequence(sequence);
 | 
				
			||||||
}).then($DONE, $DONE);
 | 
					}).then($DONE, $DONE);
 | 
				
			||||||
 | 
				
			|||||||
@ -44,7 +44,7 @@ Promise.all([
 | 
				
			|||||||
    return checkSequence(sequence, 'Expected to be called second.');
 | 
					    return checkSequence(sequence, 'Expected to be called second.');
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
]).then(result => {
 | 
					]).then(result => {
 | 
				
			||||||
  compareArray(result, [true, true, true]);
 | 
					  assert.compareArray(result, [true, true, true]);
 | 
				
			||||||
  assert.sameValue(sequence.length, 5);
 | 
					  assert.sameValue(sequence.length, 5);
 | 
				
			||||||
  checkSequence(sequence)
 | 
					  checkSequence(sequence)
 | 
				
			||||||
}).then($DONE, $DONE);
 | 
					}).then($DONE, $DONE);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user