@@ -36,7 +36,7 @@ Deno.test("Context with 0 should return self", () => {
3636Deno . test ( "Context with default" , ( ) => {
3737 const CtxWithDefault = createKeyWithDefault < string > (
3838 "CtxWithDefault" ,
39- "DEFAULT"
39+ "DEFAULT" ,
4040 ) ;
4141 const emptyCtx = new Stack ( ) ;
4242 expect ( emptyCtx . get ( CtxWithDefault . Consumer ) ) . toBe ( "DEFAULT" ) ;
@@ -58,7 +58,7 @@ Deno.test("Context without default", () => {
5858 const emptyCtx = new Stack ( ) ;
5959 expect ( emptyCtx . get ( CtxNoDefault . Consumer ) ) . toBe ( undefined ) ;
6060 expect ( ( ) => emptyCtx . getOrFail ( CtxNoDefault . Consumer ) ) . toThrow (
61- "Cannot find context CtxNoDefault"
61+ "Cannot find context CtxNoDefault" ,
6262 ) ;
6363 expect ( emptyCtx . has ( CtxNoDefault . Consumer ) ) . toBe ( false ) ;
6464 const ctx = emptyCtx . with ( CtxNoDefault . Provider ( "A" ) ) ;
@@ -88,7 +88,7 @@ Deno.test("Stack.getAll()", () => {
8888 Ctx3 . Provider ( "3" ) ,
8989 Ctx1 . Provider ( "1.1" ) ,
9090 Ctx2 . Provider ( "2.1" ) ,
91- Ctx1 . Provider ( "1.2" )
91+ Ctx1 . Provider ( "1.2" ) ,
9292 ) ;
9393
9494 expect ( stack . get ( Ctx1 . Consumer ) ) . toBe ( "1.2" ) ;
@@ -110,7 +110,7 @@ Deno.test("Stack.dedupe()", () => {
110110 Ctx3 . Provider ( "3" ) ,
111111 Ctx1 . Provider ( "1.1" ) ,
112112 Ctx2 . Provider ( "2.1" ) ,
113- Ctx1 . Provider ( "1.2" )
113+ Ctx1 . Provider ( "1.2" ) ,
114114 )
115115 . dedupe ( ) ;
116116
@@ -140,7 +140,7 @@ Deno.test("Stack.dedupe() with RESET", () => {
140140 Ctx2 . Provider ( "2.1" ) ,
141141 Ctx1 . Provider ( "1.2" ) ,
142142 Ctx1 . Provider ( "1.2" ) ,
143- Ctx2 . Reset
143+ Ctx2 . Reset ,
144144 )
145145 . dedupe ( ) ;
146146
@@ -247,7 +247,7 @@ Deno.test("Debug stack", () => {
247247 const ctx = new Stack ( ) . with (
248248 ACtx . Provider ( "a1" ) ,
249249 BCtx . Provider ( "b1" ) ,
250- ACtx . Provider ( "a2" )
250+ ACtx . Provider ( "a2" ) ,
251251 ) ;
252252 const debugValue = ctx . debug ( ) ;
253253 expect ( debugValue ) . toMatchObject ( [
@@ -291,29 +291,29 @@ Deno.test("Stack.inspect()", () => {
291291 const EmptyKey = createEmptyKey ( "Empty" ) ;
292292 const ctx = new Stack ( ) . with (
293293 MaybeStringKey . Provider ( undefined ) ,
294- EmptyKey . Provider ( )
294+ EmptyKey . Provider ( ) ,
295295 ) ;
296296
297297 expect ( ctx . inspect ( ) ) . toBe (
298- `Stack {\n MaybeString: undefined, Empty: [VOID]\n}`
298+ `Stack {\n MaybeString: undefined, Empty: [VOID]\n}` ,
299299 ) ;
300300} ) ;
301301
302302Deno . test ( "Custom stringify on key" , ( ) => {
303303 const UserKey = createKey < { name : string ; email : string } > ( "User" ) ;
304304 const UserPrettyKey = createKey < { name : string ; email : string } > (
305305 "User" ,
306- ( user ) => `${ user . name } <${ user . email } >`
306+ ( user ) => `${ user . name } <${ user . email } >` ,
307307 ) ;
308308
309309 const ctx = new Stack ( ) . with (
310310 UserKey . Provider ( { name : "John" , email : "john@example.com" } ) ,
311- UserPrettyKey . Provider ( { name : "Jenna" , email : "jenna@example.com" } )
311+ UserPrettyKey . Provider ( { name : "Jenna" , email : "jenna@example.com" } ) ,
312312 ) ;
313313
314314 expect ( ctx . toString ( ) ) . toBe ( "Stack { ... }" ) ;
315315 expect ( ctx . inspect ( ) ) . toBe (
316- `Stack {\n User: {"name":"John","email":"john@example.com"}\n User: Jenna <jenna@example.com>\n}`
316+ `Stack {\n User: {"name":"John","email":"john@example.com"}\n User: Jenna <jenna@example.com>\n}` ,
317317 ) ;
318318} ) ;
319319
@@ -332,7 +332,7 @@ Deno.test("Inspect non serializable value", () => {
332332 } ) ;
333333 const ctx2 = new Stack ( ) . with ( CircularPrettyKey . Provider ( circularValue ) ) ;
334334 expect ( ctx2 . inspect ( ) ) . toBe (
335- `Stack {\n Circular: {"a":1,"b":2,"circular":"[Circular]"}\n}`
335+ `Stack {\n Circular: {"a":1,"b":2,"circular":"[Circular]"}\n}` ,
336336 ) ;
337337} ) ;
338338
@@ -344,10 +344,10 @@ Deno.test("Big object are truncated in inspect", () => {
344344 secondKey : "some long text" ,
345345 thirdKey : "some long text" ,
346346 fourthKey : "some long text" ,
347- } )
347+ } ) ,
348348 ) ;
349349 expect ( ctx . inspect ( ) ) . toBe (
350- `Stack {\n BigObject: {"firstKey":"some long text","secondKey":"some long text"...\n}`
350+ `Stack {\n BigObject: {"firstKey":"some long text","secondKey":"some long text"...\n}` ,
351351 ) ;
352352} ) ;
353353
@@ -374,7 +374,7 @@ Deno.test("Incorrect extends of Stack should throw", () => {
374374 class IncorrectStack extends Stack { }
375375 const Key = createKey < string > ( "Key" ) ;
376376 expect ( ( ) => new IncorrectStack ( ) . with ( Key . Provider ( "hey" ) ) ) . toThrow (
377- `Cannot instantiate a Stack subclass, you need to override instantiate()`
377+ `Cannot instantiate a Stack subclass, you need to override instantiate()` ,
378378 ) ;
379379
380380 let error ;
0 commit comments