File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
closure/compiler/test/goog_es6_interop Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ closure_js_library(
36
36
suppress = ["moduleLoad" ],
37
37
deps = [
38
38
":person" ,
39
- "@com_google_javascript_closure_library//closure/goog/asserts" ,
40
39
],
41
40
)
42
41
Original file line number Diff line number Diff line change 20
20
goog . declareModuleId ( 'rulesClosure.googEs6Interop.personFactory' ) ;
21
21
22
22
import { Person } from '/closure/compiler/test/goog_es6_interop/person.js' ;
23
- import { assert } from 'goog:goog.asserts' ;
24
23
25
24
/**
26
25
* Creates a new `Person`.
@@ -30,6 +29,9 @@ import {assert} from 'goog:goog.asserts';
30
29
*/
31
30
export const createPerson = ( name ) => {
32
31
const pieces = name . split ( ' ' ) ;
32
+ if ( pieces . length != 2 ) {
33
+ throw new Error ( 'Assertion failed' ) ;
34
+ }
33
35
assert ( 2 === pieces . length ) ;
34
36
return new Person ( pieces [ 0 ] , pieces [ 1 ] ) ;
35
37
} ;
You can’t perform that action at this time.
0 commit comments