@sprucelabs/mercury-chunking-emitter 1.1.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,4 +20,5 @@ export default class MockChunkingEmitter implements ChunkingEmitter {
20
20
  assertDidEmit(): void;
21
21
  assertDidEmitEventNamed(fqen: EventName): void;
22
22
  assertEventHonorsChunkingSignature(fqen: EventName): void;
23
+ assertDidNotEmit(): void;
23
24
  }
@@ -50,5 +50,8 @@ class MockChunkingEmitter {
50
50
  test_utils_1.assert.isTruthy(chunkField, 'Your event does not conform to the chunking signature. Please add a chunk field to your event payload. Add a field to your payload called chunk: chunkFieldDefinition()');
51
51
  test_utils_1.assert.isEqualDeep(chunkField, (0, chunkFieldDefinition_1.chunkFieldDefinition)(), 'Your chunk field is there but not properly formed. Use chunkFieldDefinition() to define it.');
52
52
  }
53
+ assertDidNotEmit() {
54
+ test_utils_1.assert.isFalse(this.didEmit, `You called chunkingEmitter.emit(...) but you should not have!`);
55
+ }
53
56
  }
54
57
  exports.default = MockChunkingEmitter;
@@ -20,4 +20,5 @@ export default class MockChunkingEmitter implements ChunkingEmitter {
20
20
  assertDidEmit(): void;
21
21
  assertDidEmitEventNamed(fqen: EventName): void;
22
22
  assertEventHonorsChunkingSignature(fqen: EventName): void;
23
+ assertDidNotEmit(): void;
23
24
  }
@@ -59,4 +59,7 @@ export default class MockChunkingEmitter {
59
59
  assert.isTruthy(chunkField, 'Your event does not conform to the chunking signature. Please add a chunk field to your event payload. Add a field to your payload called chunk: chunkFieldDefinition()');
60
60
  assert.isEqualDeep(chunkField, chunkFieldDefinition(), 'Your chunk field is there but not properly formed. Use chunkFieldDefinition() to define it.');
61
61
  }
62
+ assertDidNotEmit() {
63
+ assert.isFalse(this.didEmit, `You called chunkingEmitter.emit(...) but you should not have!`);
64
+ }
62
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprucelabs/mercury-chunking-emitter",
3
- "version": "1.1.5",
3
+ "version": "1.2.0",
4
4
  "files": [
5
5
  "build/**/*",
6
6
  "!build/__tests__",