feat: Update notification object to match the updated examples

This commit is contained in:
Joachim Van Herwegen
2023-01-24 13:45:22 +01:00
parent caee563dd6
commit 7c343a5fcc
12 changed files with 26 additions and 61 deletions

View File

@@ -42,16 +42,12 @@ export function expectNotification(notification: unknown, topic: string, type: '
'https://www.w3.org/ns/solid/notification/v1',
],
id: expect.stringContaining(topic),
type: [ type ],
object: {
id: topic,
type: [],
},
type,
object: topic,
published: expect.anything(),
};
if (type !== 'Delete') {
expected.state = expect.anything();
expected.object.type.push('http://www.w3.org/ns/ldp#Resource');
}
expect(notification).toEqual(expected);
}