@@ -21,15 +21,15 @@ describe("edge cases", () => {
21
21
} ) ;
22
22
23
23
context ( "try to decode a map with non-string keys (asynchronous)" , ( ) => {
24
- it ( "throws errors" , ( ) => {
24
+ it ( "throws errors" , async ( ) => {
25
25
const createStream = async function * ( ) {
26
26
yield [ 0x81 ] ; // fixmap size=1
27
27
yield encode ( null ) ;
28
28
yield encode ( null ) ;
29
29
} ;
30
30
31
- assert . rejects ( async ( ) => {
32
- decodeAsync ( createStream ( ) ) ;
31
+ await assert . rejects ( async ( ) => {
32
+ await decodeAsync ( createStream ( ) ) ;
33
33
} , / T h e t y p e o f k e y m u s t b e s t r i n g / i) ;
34
34
} ) ;
35
35
} ) ;
@@ -54,13 +54,13 @@ describe("edge cases", () => {
54
54
} , RangeError ) ;
55
55
} ) ;
56
56
57
- it ( "throws errors (asynchronous)" , ( ) => {
57
+ it ( "throws errors (asynchronous)" , async ( ) => {
58
58
const createStream = async function * ( ) {
59
59
yield [ 0x92 ] ; // fixarray size=2
60
60
yield encode ( null ) ;
61
61
} ;
62
62
63
- assert . rejects ( async ( ) => {
63
+ await assert . rejects ( async ( ) => {
64
64
await decodeAsync ( createStream ( ) ) ;
65
65
} , RangeError ) ;
66
66
} ) ;
@@ -76,23 +76,23 @@ describe("edge cases", () => {
76
76
} , RangeError ) ;
77
77
} ) ;
78
78
79
- it ( "throws errors (asynchronous)" , ( ) => {
79
+ it ( "throws errors (asynchronous)" , async ( ) => {
80
80
const createStream = async function * ( ) {
81
81
yield [ 0x90 ] ; // fixarray size=0
82
82
yield encode ( null ) ;
83
83
} ;
84
84
85
- assert . rejects ( async ( ) => {
85
+ await assert . rejects ( async ( ) => {
86
86
await decodeAsync ( createStream ( ) ) ;
87
87
} , RangeError ) ;
88
88
} ) ;
89
89
90
- it ( "throws errors (asynchronous)" , ( ) => {
90
+ it ( "throws errors (asynchronous)" , async ( ) => {
91
91
const createStream = async function * ( ) {
92
92
yield [ 0x90 , ...encode ( null ) ] ; // fixarray size=0 + nil
93
93
} ;
94
94
95
- assert . rejects ( async ( ) => {
95
+ await assert . rejects ( async ( ) => {
96
96
await decodeAsync ( createStream ( ) ) ;
97
97
} , RangeError ) ;
98
98
} ) ;
0 commit comments