@sprucelabs/spruce-file-utils 15.1.5 → 15.1.6

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.
@@ -2,10 +2,11 @@ import { AbstractEventEmitter } from '@sprucelabs/mercury-event-emitter';
2
2
  import { UploadedFile } from '../files.types';
3
3
  import { ChunkingUploader, ChunkingUploaderEventContract, UploadOptions } from './ChunkingUploader';
4
4
  export default class MockChunkingUploader extends AbstractEventEmitter<ChunkingUploaderEventContract> implements ChunkingUploader {
5
- static instance: MockChunkingUploader;
5
+ static instance?: MockChunkingUploader;
6
6
  private lastUploadOptions?;
7
7
  private lastUploadResponse?;
8
8
  constructor();
9
+ static assertWasCreated(): void;
9
10
  assertFileEqualsLastReturnedFromUpload(file: UploadedFile): void;
10
11
  assertUploadOptionsEqual(options: UploadOptions): void;
11
12
  upload(options: UploadOptions): Promise<{
@@ -9,6 +9,9 @@ class MockChunkingUploader extends mercury_event_emitter_1.AbstractEventEmitter
9
9
  super(ChunkingUploader_1.chunkingUploaderEventContract);
10
10
  MockChunkingUploader.instance = this;
11
11
  }
12
+ static assertWasCreated() {
13
+ test_utils_1.assert.isTruthy(MockChunkingUploader.instance, 'You need to intantiate ChunkingUploaderImpl.Uploader(this.connectApi).');
14
+ }
12
15
  assertFileEqualsLastReturnedFromUpload(file) {
13
16
  (0, schema_1.assertOptions)({ file }, ['file']);
14
17
  test_utils_1.assert.isEqualDeep(file, this.lastUploadResponse, 'Files do not match');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-file-utils",
3
3
  "description": "Utils for working with files and Sprucebot.",
4
- "version": "15.1.5",
4
+ "version": "15.1.6",
5
5
  "skill": {
6
6
  "namespace": "files"
7
7
  },