Skip to content

Commit 72fffc8

Browse files
author
Tim Mendoza
committed
Fix helpers tests
1 parent 93efc81 commit 72fffc8

File tree

1 file changed

+32
-17
lines changed

1 file changed

+32
-17
lines changed

test/helpers/helpers.test.js

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -114,23 +114,38 @@ describe('the verifyAppDirectory function', () => {
114114

115115
describe('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 () => {

0 commit comments

Comments
 (0)