@@ -19,7 +19,7 @@ describe('markdown', () => {
1919 } ) ;
2020
2121 describe ( 'args' , ( ) => {
22- describe ( 'expression ' , ( ) => {
22+ describe ( 'content ' , ( ) => {
2323 it ( 'sets the content to all strings in expression concatenated' , ( ) => {
2424 const result = fn ( null , {
2525 content : [ '# this ' , 'is ' , 'some ' , 'markdown' ] ,
@@ -54,5 +54,32 @@ describe('markdown', () => {
5454 // TODO: write test when using an instance of the interpreter
5555 // it("defaults to the expression '{font}'", () => {});
5656 } ) ;
57+ describe ( 'openLinksInNewTab' , ( ) => {
58+ it ( 'sets the value of openLinksInNewTab to true ' , ( ) => {
59+ const result = fn ( null , {
60+ content : [ 'some ' , 'markdown' ] ,
61+ openLinksInNewTab : true ,
62+ } ) ;
63+
64+ expect ( result . value ) . toHaveProperty ( 'openLinksInNewTab' , true ) ;
65+ } ) ;
66+
67+ it ( 'sets the value of openLinksInNewTab to false ' , ( ) => {
68+ const result = fn ( null , {
69+ content : [ 'some ' , 'markdown' ] ,
70+ openLinksInNewTab : false ,
71+ } ) ;
72+
73+ expect ( result . value ) . toHaveProperty ( 'openLinksInNewTab' , false ) ;
74+ } ) ;
75+
76+ it ( 'defaults the value of openLinksInNewTab to false ' , ( ) => {
77+ const result = fn ( null , {
78+ content : [ 'some ' , 'markdown' ] ,
79+ } ) ;
80+
81+ expect ( result . value ) . toHaveProperty ( 'openLinksInNewTab' , false ) ;
82+ } ) ;
83+ } ) ;
5784 } ) ;
5885} ) ;
0 commit comments