mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Emit container pub event on PUT.
Closes https://github.com/solid/community-server/issues/612
This commit is contained in:
committed by
Joachim Van Herwegen
parent
6edc255707
commit
c3cff553e3
@@ -68,14 +68,20 @@ describe('A server with the Solid WebSockets API behind a proxy', (): void => {
|
||||
]);
|
||||
});
|
||||
|
||||
describe('when the client subscribes to a resource', (): void => {
|
||||
describe('when the client subscribes to resources', (): void => {
|
||||
beforeAll(async(): Promise<void> => {
|
||||
client.send(`sub https://example.pod/my-resource`);
|
||||
client.send('sub https://example.pod/my-resource');
|
||||
client.send('sub https://example.pod/other-resource');
|
||||
client.send('sub https://example.pod/');
|
||||
await new Promise((resolve): any => client.once('message', resolve));
|
||||
});
|
||||
|
||||
it('acknowledges the subscription.', async(): Promise<void> => {
|
||||
expect(messages).toEqual([ `ack https://example.pod/my-resource` ]);
|
||||
expect(messages).toEqual([
|
||||
'ack https://example.pod/my-resource',
|
||||
'ack https://example.pod/other-resource',
|
||||
'ack https://example.pod/',
|
||||
]);
|
||||
});
|
||||
|
||||
it('notifies the client of resource updates.', async(): Promise<void> => {
|
||||
@@ -87,7 +93,10 @@ describe('A server with the Solid WebSockets API behind a proxy', (): void => {
|
||||
},
|
||||
body: '{}',
|
||||
});
|
||||
expect(messages).toEqual([ `pub https://example.pod/my-resource` ]);
|
||||
expect(messages).toEqual([
|
||||
'pub https://example.pod/',
|
||||
'pub https://example.pod/my-resource',
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user