Skip to content

Commit c300940

Browse files
committed
test updates
1 parent 50a848e commit c300940

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

app/registries/providers/mau/Mau.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,27 @@ test('getAuthPull should return username/password when token is configured', asy
154154
password: TEST_TOKEN,
155155
});
156156
});
157+
158+
test('init should default url/authurl when configuration is undefined', async () => {
159+
const mauDefault = new Mau();
160+
mauDefault.configuration = undefined;
161+
162+
mauDefault.init();
163+
164+
expect(mauDefault.configuration).toEqual({
165+
url: 'https://dock.mau.dev',
166+
authurl: 'https://dock.mau.dev',
167+
});
168+
});
169+
170+
test('init should convert string configuration to object defaults', async () => {
171+
const mauString = new Mau();
172+
mauString.configuration = '';
173+
174+
mauString.init();
175+
176+
expect(mauString.configuration).toEqual({
177+
url: 'https://dock.mau.dev',
178+
authurl: 'https://dock.mau.dev',
179+
});
180+
});

0 commit comments

Comments
 (0)