@@ -9,23 +9,24 @@ description: >
9
9
features: [BigInt, Symbol, Temporal]
10
10
---*/
11
11
12
- const timeZone = "UTC" ;
13
12
const instance = new Temporal . PlainDate ( 2000 , 5 , 2 ) ;
14
13
15
14
const primitiveTests = [
16
15
[ null , "null" ] ,
17
16
[ true , "boolean" ] ,
18
- [ "" , "empty string" ] ,
19
- [ 1 , "number that doesn't convert to a valid ISO string" ] ,
17
+ [ 1 , "number" ] ,
20
18
[ 1n , "bigint" ] ,
19
+ [ 19970327 , "large number" ] ,
20
+ [ - 19970327 , "negative number" ] ,
21
+ [ 1234567890 , "very large integer" ] ,
21
22
] ;
22
23
23
24
for ( const [ calendar , description ] of primitiveTests ) {
24
- const arg = { year : 2019 , monthCode : "M11" , day : 1 , calendar } ;
25
+ const arg = { year : 1976 , monthCode : "M11" , day : 18 , calendar } ;
25
26
assert . throws (
26
- typeof calendar === 'string' ? RangeError : TypeError ,
27
+ TypeError ,
27
28
( ) => instance . equals ( arg ) ,
28
- `${ description } does not convert to a valid ISO string `
29
+ `${ description } is not a valid calendar `
29
30
) ;
30
31
}
31
32
@@ -37,5 +38,9 @@ const typeErrorTests = [
37
38
38
39
for ( const [ calendar , description ] of typeErrorTests ) {
39
40
const arg = { year : 2019 , monthCode : "M11" , day : 1 , calendar } ;
40
- assert . throws ( TypeError , ( ) => instance . equals ( arg ) , `${ description } is not a valid property bag and does not convert to a string` ) ;
41
+ assert . throws (
42
+ TypeError ,
43
+ ( ) => instance . equals ( arg ) ,
44
+ `${ description } is not a valid property bag and does not convert to a string`
45
+ ) ;
41
46
}
0 commit comments