Skip to content

Commit 0ac33c8

Browse files
committed
Add some comments about tests.
1 parent 0600523 commit 0ac33c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: spec/unit/pushprocessor.spec.ts

+5
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ describe("NotificationService", function () {
287287
expect(actions.tweaks.highlight).toEqual(true);
288288
});
289289

290+
// TODO: This is not spec compliant behaviour.
290291
it("should bing on character group ([abc]) bing words.", function () {
291292
testEvent.event.content!.body = "Ping!";
292293
let actions = pushProcessor.actionsForEvent(testEvent);
@@ -296,12 +297,14 @@ describe("NotificationService", function () {
296297
expect(actions.tweaks.highlight).toEqual(true);
297298
});
298299

300+
// TODO: This is not spec compliant behaviour.
299301
it("should bing on character range ([a-z]) bing words.", function () {
300302
testEvent.event.content!.body = "I ate 6 pies";
301303
const actions = pushProcessor.actionsForEvent(testEvent);
302304
expect(actions.tweaks.highlight).toEqual(true);
303305
});
304306

307+
// TODO: This is not spec compliant behaviour.
305308
it("should bing on character negation ([!a]) bing words.", function () {
306309
testEvent.event.content!.body = "boke";
307310
let actions = pushProcessor.actionsForEvent(testEvent);
@@ -330,6 +333,8 @@ describe("NotificationService", function () {
330333
// invalid
331334

332335
it("should gracefully handle bad input.", function () {
336+
// The following body is an object (not a string) and thus is invalid
337+
// for matching against.
333338
testEvent.event.content!.body = { foo: "bar" };
334339
const actions = pushProcessor.actionsForEvent(testEvent);
335340
expect(actions.tweaks.highlight).toEqual(false);

0 commit comments

Comments
 (0)