File tree Expand file tree Collapse file tree
packages/jest-jasmine2/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
3+ *
4+ * This source code is licensed under the MIT license found in the
5+ * LICENSE file in the root directory of this source tree.
6+ *
7+ */
8+
9+ 'use strict' ;
10+
11+ import Suite from '../jasmine/Suite' ;
12+
13+ describe ( 'Suite' , ( ) => {
14+ let suite ;
15+
16+ beforeEach ( ( ) => {
17+ suite = new Suite ( {
18+ getTestPath : ( ) => '' ,
19+ } ) ;
20+ } ) ;
21+
22+ it ( "doesn't throw on addExpectationResult when there are no children" , ( ) => {
23+ expect ( ( ) => {
24+ suite . addExpectationResult ( ) ;
25+ } ) . not . toThrow ( ) ;
26+ } ) ;
27+ } ) ;
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ function convertDescriptorToString(descriptor) {
210210}
211211
212212function isAfterAll ( children ) {
213- return children && children [ 0 ] . result . status ;
213+ return children && children [ 0 ] && children [ 0 ] . result . status ;
214214}
215215
216216function isFailure ( args ) {
You can’t perform that action at this time.
0 commit comments