@@ -9,21 +9,21 @@ import {
99describe ( "w3ds file URI" , ( ) => {
1010 describe ( "buildFileUri" , ( ) => {
1111 it ( "builds a canonical URI" , ( ) => {
12- expect (
13- buildFileUri ( { ename : " @alice" , metaEnvelopeId : " abc123" } ) ,
14- ) . toBe ( "w3ds://file?id=@alice/abc123" ) ;
12+ expect ( buildFileUri ( { ename : "@alice" , metaEnvelopeId : "abc123" } ) ) . toBe (
13+ "w3ds://file?id= @alice/ abc123",
14+ ) ;
1515 } ) ;
1616
1717 it ( "normalises a missing @ prefix on the ename" , ( ) => {
18- expect (
19- buildFileUri ( { ename : "alice" , metaEnvelopeId : " abc123" } ) ,
20- ) . toBe ( "w3ds://file?id=@alice/abc123" ) ;
18+ expect ( buildFileUri ( { ename : "alice" , metaEnvelopeId : "abc123" } ) ) . toBe (
19+ "w3ds://file?id=@alice/ abc123",
20+ ) ;
2121 } ) ;
2222
2323 it ( "throws when ename or metaEnvelopeId is missing" , ( ) => {
24- expect ( ( ) =>
25- buildFileUri ( { ename : "" , metaEnvelopeId : "abc" } ) ,
26- ) . toThrow ( InvalidW3dsUriError ) ;
24+ expect ( ( ) => buildFileUri ( { ename : "" , metaEnvelopeId : "abc" } ) ) . toThrow (
25+ InvalidW3dsUriError ,
26+ ) ;
2727 expect ( ( ) =>
2828 buildFileUri ( { ename : "@alice" , metaEnvelopeId : "" } ) ,
2929 ) . toThrow ( InvalidW3dsUriError ) ;
@@ -47,15 +47,15 @@ describe("w3ds file URI", () => {
4747 } ) ;
4848
4949 it ( "rejects a non-w3ds scheme" , ( ) => {
50- expect ( ( ) =>
51- parseFileUri ( "https://file?id=@alice/abc" ) ,
52- ) . toThrow ( / e x p e c t e d s c h e m e / ) ;
50+ expect ( ( ) => parseFileUri ( "https://file?id=@alice/abc" ) ) . toThrow (
51+ / e x p e c t e d s c h e m e / ,
52+ ) ;
5353 } ) ;
5454
5555 it ( "rejects a wrong host" , ( ) => {
56- expect ( ( ) =>
57- parseFileUri ( "w3ds://blob?id=@alice/abc" ) ,
58- ) . toThrow ( / e x p e c t e d h o s t / ) ;
56+ expect ( ( ) => parseFileUri ( "w3ds://blob?id=@alice/abc" ) ) . toThrow (
57+ / e x p e c t e d h o s t / ,
58+ ) ;
5959 } ) ;
6060
6161 it ( "rejects a missing id parameter" , ( ) => {
@@ -65,9 +65,9 @@ describe("w3ds file URI", () => {
6565 } ) ;
6666
6767 it ( "rejects an id without an ename" , ( ) => {
68- expect ( ( ) =>
69- parseFileUri ( "w3ds://file?id=alice/abc" ) ,
70- ) . toThrow ( / m u s t b e i n t h e f o r m / ) ;
68+ expect ( ( ) => parseFileUri ( "w3ds://file?id=alice/abc" ) ) . toThrow (
69+ / m u s t b e i n t h e f o r m / ,
70+ ) ;
7171 } ) ;
7272
7373 it ( "rejects an id without a meta-envelope-id segment" , ( ) => {
0 commit comments