File tree Expand file tree Collapse file tree 1 file changed +32
-17
lines changed
Expand file tree Collapse file tree 1 file changed +32
-17
lines changed Original file line number Diff line number Diff line change @@ -114,23 +114,38 @@ describe('the verifyAppDirectory function', () => {
114114
115115describe ( 'the getAssets function' , ( ) => {
116116 it ( 'should add index.html at "/" and "/login" paths' , async ( ) => {
117- expect ( await getAssets ( 'mockFolder' ) ) . toEqual ( [
118- {
119- name : 'index.html' ,
120- path : 'index.html' ,
121- content : 'mockHTMLcontent' ,
122- } ,
123- {
124- name : '/' ,
125- path : '/' ,
126- content : 'mockHTMLcontent' ,
127- } ,
128- {
129- name : '/login' ,
130- path : '/login' ,
131- content : 'mockHTMLcontent' ,
132- } ,
133- ] ) ;
117+ expect ( await getAssets ( 'mockFolder' ) ) . toEqual (
118+ expect . arrayContaining ( [
119+ {
120+ name : 'index.html' ,
121+ path : 'index.html' ,
122+ content : 'mockHTMLcontent' ,
123+ } ,
124+ {
125+ name : '/' ,
126+ path : '/' ,
127+ content : 'mockHTMLcontent' ,
128+ } ,
129+ {
130+ name : '/login' ,
131+ path : '/login' ,
132+ content : 'mockHTMLcontent' ,
133+ } ,
134+ ] )
135+ ) ;
136+ } ) ;
137+
138+ it ( 'should add the auth-handler.js as a private asset' , async ( ) => {
139+ expect ( await getAssets ( 'mockFolder' ) ) . toEqual (
140+ expect . arrayContaining ( [
141+ {
142+ name : 'auth-handler' ,
143+ path : '/auth-handler.js' ,
144+ content : expect . any ( Buffer ) ,
145+ access : 'private' ,
146+ } ,
147+ ] )
148+ ) ;
134149 } ) ;
135150
136151 it ( 'should use the CWD when provided with a relative path' , async ( ) => {
You can’t perform that action at this time.
0 commit comments